Commits

Rostyslav Bryzgunov committed 1f52db0

New urls installation implemented (django-project is required)

Comments (0)

Files changed (5)

source/conf/apps/admin/urls.py

-# TODO
+from django.conf.urls.defaults import patterns, include, url
+from django.contrib import admin
+
+admin.autodiscover()
+
+urlpatterns = patterns('',
+    (r'^admin/', include(admin.site.urls)),
+)

source/conf/apps/web/urls.py

+from django.conf.urls.defaults import patterns, include, url
+
+urlpatterns = patterns('',
+    (r'', include('web.urls')),
+)

source/conf/settings/dev.py

 from project.utils.install import install_settings, install_app
 
 install_settings('conf.settings.main')
+install_app('django.contrib.admin', 'conf.apps.admin')
 install_app('web', 'conf.apps.web')
-install_app('django.contrib.admin', 'conf.apps.admin')
 import_settings(globals())
 
 DEBUG = TEMPLATE_DEBUG = True

source/conf/settings/live.py

 from project.utils.install import install_settings, install_app
 
 install_settings('conf.settings.main')
+install_app('django.contrib.admin', 'conf.apps.admin')
 install_app('web', 'conf.apps.web')
-install_app('django.contrib.admin', 'conf.apps.admin')
 import_settings(globals())
 
 DEBUG = TEMPLATE_DEBUG = False
 from django.conf.urls.defaults import patterns, include, url
 from django.conf import settings
+from project.utils.install import install_apps_urls
 
-from django.contrib import admin
-admin.autodiscover()
-
-urlpatterns = patterns('',
-    (r'^admin/', include(admin.site.urls)),
-    (r'', include('web.urls')),
-)
+urlpatterns = patterns('')
      
 # Adding debug-mappings
 if settings.DEBUG:
     from django.conf.urls.static import static
     urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
 
+install_apps_urls()
+
 # Unregister
 #from django.contrib.auth.models import User, Group
 #admin.site.unregister(User)