# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1277478231 18000 # Node ID 3cef0d445036d433e70012a8bc9cbce136fc1f29 # Parent 013cf0aa49b71914a3769973c3facd7bc3ba5fec Start actual app structure diff -r 013cf0aa49b7 -r 3cef0d445036 apps/bundle/__init__.py diff -r 013cf0aa49b7 -r 3cef0d445036 apps/bundle/models.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apps/bundle/models.py Fri Jun 25 10:03:51 2010 -0500 @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff -r 013cf0aa49b7 -r 3cef0d445036 apps/bundle/tests.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apps/bundle/tests.py Fri Jun 25 10:03:51 2010 -0500 @@ -0,0 +1,23 @@ +""" +This file demonstrates two different styles of tests (one doctest and one +unittest). These will both pass when you run "manage.py test". + +Replace these with more appropriate tests for your application. +""" + +from django.test import TestCase + +class SimpleTest(TestCase): + def test_basic_addition(self): + """ + Tests that 1 + 1 always equals 2. + """ + self.failUnlessEqual(1 + 1, 2) + +__test__ = {"doctest": """ +Another way to test that 1 + 1 is equal to 2. + +>>> 1 + 1 == 2 +True +"""} + diff -r 013cf0aa49b7 -r 3cef0d445036 apps/bundle/views.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apps/bundle/views.py Fri Jun 25 10:03:51 2010 -0500 @@ -0,0 +1,1 @@ +# Create your views here. diff -r 013cf0aa49b7 -r 3cef0d445036 apps/free_license/__init__.py diff -r 013cf0aa49b7 -r 3cef0d445036 apps/free_license/models.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apps/free_license/models.py Fri Jun 25 10:03:51 2010 -0500 @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff -r 013cf0aa49b7 -r 3cef0d445036 apps/free_license/tests.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apps/free_license/tests.py Fri Jun 25 10:03:51 2010 -0500 @@ -0,0 +1,23 @@ +""" +This file demonstrates two different styles of tests (one doctest and one +unittest). These will both pass when you run "manage.py test". + +Replace these with more appropriate tests for your application. +""" + +from django.test import TestCase + +class SimpleTest(TestCase): + def test_basic_addition(self): + """ + Tests that 1 + 1 always equals 2. + """ + self.failUnlessEqual(1 + 1, 2) + +__test__ = {"doctest": """ +Another way to test that 1 + 1 is equal to 2. + +>>> 1 + 1 == 2 +True +"""} + diff -r 013cf0aa49b7 -r 3cef0d445036 apps/free_license/views.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apps/free_license/views.py Fri Jun 25 10:03:51 2010 -0500 @@ -0,0 +1,1 @@ +# Create your views here. diff -r 013cf0aa49b7 -r 3cef0d445036 apps/snippet/__init__.py diff -r 013cf0aa49b7 -r 3cef0d445036 apps/snippet/models.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apps/snippet/models.py Fri Jun 25 10:03:51 2010 -0500 @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff -r 013cf0aa49b7 -r 3cef0d445036 apps/snippet/tests.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apps/snippet/tests.py Fri Jun 25 10:03:51 2010 -0500 @@ -0,0 +1,23 @@ +""" +This file demonstrates two different styles of tests (one doctest and one +unittest). These will both pass when you run "manage.py test". + +Replace these with more appropriate tests for your application. +""" + +from django.test import TestCase + +class SimpleTest(TestCase): + def test_basic_addition(self): + """ + Tests that 1 + 1 always equals 2. + """ + self.failUnlessEqual(1 + 1, 2) + +__test__ = {"doctest": """ +Another way to test that 1 + 1 is equal to 2. + +>>> 1 + 1 == 2 +True +"""} + diff -r 013cf0aa49b7 -r 3cef0d445036 apps/snippet/views.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apps/snippet/views.py Fri Jun 25 10:03:51 2010 -0500 @@ -0,0 +1,1 @@ +# Create your views here. diff -r 013cf0aa49b7 -r 3cef0d445036 mippet/__init__.py diff -r 013cf0aa49b7 -r 3cef0d445036 mippet/admin.py --- a/mippet/admin.py Thu Jun 24 08:59:14 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -from agora.mippet.models import * -from django.contrib import admin - -admin.site.register(mscript) -admin.site.register(free_license) -admin.site.register(bundle) diff -r 013cf0aa49b7 -r 3cef0d445036 mippet/models.py --- a/mippet/models.py Thu Jun 24 08:59:14 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -from django.db import models - -# Create your models here. - -class free_license(models.Model): - name = models.CharField(max_length=200) - desc = models.TextField() - text = models.TextField() - gpl_compatible = models.BooleanField() - def __unicode__(self): - return self.name - - -class mscript(models.Model): - name = models.CharField(max_length=512) - code = models.TextField() - free_license = models.ForeignKey(free_license) - underlying_file = models.FileField(upload_to="var/") - is_standalone = models.BooleanField() - def __unicode__(self): - return self(name) - -class bundle(models.Model): - name = models.CharField(max_length=512) - script = mscript() - def __unicode__(self): - return self(name) diff -r 013cf0aa49b7 -r 3cef0d445036 mippet/tests.py --- a/mippet/tests.py Thu Jun 24 08:59:14 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -""" -This file demonstrates two different styles of tests (one doctest and one -unittest). These will both pass when you run "manage.py test". - -Replace these with more appropriate tests for your application. -""" - -from django.test import TestCase - -class SimpleTest(TestCase): - def test_basic_addition(self): - """ - Tests that 1 + 1 always equals 2. - """ - self.failUnlessEqual(1 + 1, 2) - -__test__ = {"doctest": """ -Another way to test that 1 + 1 is equal to 2. - ->>> 1 + 1 == 2 -True -"""} - diff -r 013cf0aa49b7 -r 3cef0d445036 mippet/views.py --- a/mippet/views.py Thu Jun 24 08:59:14 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -# Create your views here. diff -r 013cf0aa49b7 -r 3cef0d445036 urls.py --- a/urls.py Thu Jun 24 08:59:14 2010 -0500 +++ b/urls.py Fri Jun 25 10:03:51 2010 -0500 @@ -6,10 +6,16 @@ urlpatterns = patterns('', - (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.html'}), + (r'^$', + 'django.views.generic.simple.direct_to_template', + {'template': 'index.html'}), # Example: # (r'^agora/', include('agora.foo.urls')), + #(r'^mippets/$', 'agora.mippet.views.index'), + + #(r'^mippets/(?P.*)/$', 'agora.mippet.views.detail'), + # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: (r'^admin/doc/', include('django.contrib.admindocs.urls')),