Source

article / article / urls.py

Full commit
from django.conf.urls.defaults import *
from django.views.generic.dates import ArchiveIndexView, MonthArchiveView # YearArchiveView
from django.views.generic.base import TemplateView

from models import Post
from views import YearArchiveView

post_info_dict = {
    'queryset': Post.active.filter(is_published=1,post_type=1),
    'date_field': 'post_date_create',
    }

urlpatterns = patterns('article.views',
    url(r'^$', 'main_index', name="home-url"),
    url(r'^mylist/$', 'shoplist'),
    url(r'^recipe/(?P<recipe_slug>[-\w]+)/$', 'recipe_detail', name="recipe-detail-url"),    
    url(r'^recipes/(?P<tag>[-\w]+)/$', 'recipe_index', name="recipes-tag-url"),
    url(r'^recipes/$', 'recipe_index', name="recipes-url"),
    url(r'^meals/(?P<name>[-\w]+)/$', 'meals'),
    url(r'^faq/$', 'faq_index'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<post_slug>[-\w]+)/$',
        'post_detail', name="post-detail-url"),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/$', MonthArchiveView.as_view(model=Post, month_format='%m', date_field="published_on"), name="archive-month"),
    url(r'^(?P<year>\d{4})/$', YearArchiveView.as_view(), name="archive-year"),
    url(r'^blog/archive/$', ArchiveIndexView.as_view(model=Post, date_field="published_on"), name="blog-archive"),
    url(r'^blog/$', 'post_index', name="blog-url"),
    url(r'^topic/(?P<category>[-\w]+)/$', 'post_category_index', name="category"),
    url(r'^get-started/$', TemplateView.as_view(template_name='new_here.html'), name="new_here"),
    url(r'^video/$', 'video_index'),
    url(r'^join/$', 'mc_signup'),
    url(r'^about/contact/$', 'contact', name='contact'),
)