Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

from django.conf.urls import patterns

from django.conf.urls import patterns,include,url

urlpatterns = patterns('news.views',
    url(r'^articles/([0-9]{4})/$', 'year_archive'),
    url(r'^articles/([0-9]{4})/([0-9]{2})/$', 'month_archive'),
    url(r'^articles/([0-9]{4})/([0-9]{2})/([0-9]+)/$', 'article_detail'),
)
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #import #patterns
ADD COMMENT
Topic
Name
1+3 =