diff --git a/testapp/testapp/settings.py b/testapp/testapp/settings.py index e81d51f..da0f83d 100644 --- a/testapp/testapp/settings.py +++ b/testapp/testapp/settings.py @@ -7,7 +7,7 @@ PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) import os, sys -# Including the great parent so that djang_select2 can be found. +# Including the great parent so that django_select2 can be found. parent_folder = PROJECT_ROOT parent_folder = parent_folder.split('/')[:-2] parent_folder = '/'.join(parent_folder) @@ -130,8 +130,8 @@ INSTALLED_APPS = ( # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', - "django_select2", - "testmain", + 'django_select2', + 'testapp.testmain', ) # A sample logging configuration. The only tangible logging diff --git a/testapp/testmain/__init__.py b/testapp/testapp/testmain/__init__.py similarity index 100% rename from testapp/testmain/__init__.py rename to testapp/testapp/testmain/__init__.py diff --git a/testapp/testmain/fixtures/initial_data.json b/testapp/testapp/testmain/fixtures/initial_data.json similarity index 100% rename from testapp/testmain/fixtures/initial_data.json rename to testapp/testapp/testmain/fixtures/initial_data.json diff --git a/testapp/testmain/forms.py b/testapp/testapp/testmain/forms.py similarity index 100% rename from testapp/testmain/forms.py rename to testapp/testapp/testmain/forms.py diff --git a/testapp/testmain/models.py b/testapp/testapp/testmain/models.py similarity index 100% rename from testapp/testmain/models.py rename to testapp/testapp/testmain/models.py diff --git a/testapp/testapp/testmain/urls.py b/testapp/testapp/testmain/urls.py new file mode 100644 index 0000000..f314f5d --- /dev/null +++ b/testapp/testapp/testmain/urls.py @@ -0,0 +1,13 @@ +from django.conf.urls.defaults import * + +urlpatterns = patterns('testapp.testmain.views', + url(r'single/model/field/$', 'test_single_value_model_field', name='test_single_value_model_field'), + url(r'single/model/field/([0-9]+)/$', 'test_single_value_model_field1', name='test_single_value_model_field1'), + + url(r'multi/model/field/$', 'test_multi_values_model_field', name='test_multi_values_model_field'), + url(r'multi/model/field/([0-9]+)/$', 'test_multi_values_model_field1', name='test_multi_values_model_field1'), + + url(r'mixed/form/$', 'test_mixed_form', name='test_mixed_form'), + + url(r'initial/form/$', 'test_init_values', name='test_init_values'), +) diff --git a/testapp/testmain/views.py b/testapp/testapp/testmain/views.py similarity index 100% rename from testapp/testmain/views.py rename to testapp/testapp/testmain/views.py diff --git a/testapp/testapp/urls.py b/testapp/testapp/urls.py index 7cd3d20..8c7be6f 100644 --- a/testapp/testapp/urls.py +++ b/testapp/testapp/urls.py @@ -1,15 +1,8 @@ from django.conf.urls import patterns, include, url from django.views.generic import TemplateView -# Uncomment the next two lines to enable the admin: -# from django.contrib import admin -# admin.autodiscover() - urlpatterns = patterns('', url(r'^$', TemplateView.as_view(template_name="index.html"), name='home'), - url(r'^test/', include('testmain.urls')), + url(r'^test/', include('testapp.testmain.urls')), url(r'^ext/', include('django_select2.urls')), - - # Uncomment the next line to enable the admin: - # url(r'^admin/', include(admin.site.urls)), ) diff --git a/testapp/testmain/urls.py b/testapp/testmain/urls.py deleted file mode 100644 index 9be686e..0000000 --- a/testapp/testmain/urls.py +++ /dev/null @@ -1,13 +0,0 @@ -from django.conf.urls.defaults import * - -urlpatterns = patterns("", - url(r'single/model/field/$', 'testmain.views.test_single_value_model_field', name='test_single_value_model_field'), - url(r'single/model/field/([0-9]+)/$', 'testmain.views.test_single_value_model_field1', name='test_single_value_model_field1'), - - url(r'multi/model/field/$', 'testmain.views.test_multi_values_model_field', name='test_multi_values_model_field'), - url(r'multi/model/field/([0-9]+)/$', 'testmain.views.test_multi_values_model_field1', name='test_multi_values_model_field1'), - - url(r'mixed/form/$', 'testmain.views.test_mixed_form', name='test_mixed_form'), - - url(r'initial/form/$', 'testmain.views.test_init_values', name='test_init_values'), -)