Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.27 KB | None | 0 0
  1. site/urls.py:
  2. from django.conf.urls.defaults import *
  3.  
  4. # Uncomment the next two lines to enable the admin:
  5. from django.contrib import admin
  6. admin.autodiscover()
  7.  
  8. urlpatterns = patterns('',
  9.     # Example:
  10.     (r'^news/', include('news.urls')),
  11.     #(r'^news/$', 'news.views.index'),
  12.     #(r'^/news/latest', 'news.views.latest'),
  13.     #url(r'^/hemsida/news/latest', 'news.views.latest'),
  14.     # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
  15.     # to INSTALLED_APPS to enable admin documentation:
  16.     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
  17.  
  18.     # Uncomment the next line to enable the admin:
  19.     (r'^admin/', include(admin.site.urls)),
  20. )
  21.  
  22.  
  23.  
  24.  
  25. site/news/urls.py:
  26. from django.conf.urls.defaults import *
  27.  
  28. # Uncomment the next two lines to enable the admin:
  29. #from django.contrib import admin
  30. #admin.autodiscover()
  31.  
  32. urlpatterns = patterns('new.views',
  33.     # Example:
  34.     (r'^news/$', 'index'),
  35.     (r'^/news/latest', 'latest'),
  36.  
  37.     # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
  38.     # to INSTALLED_APPS to enable admin documentation:
  39.     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
  40.  
  41.     # Uncomment the next line to enable the admin:
  42.     #(r'^admin/', include(admin.site.urls)),
  43. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement