Example #1
0
        login_required(generic.DateDetailView.as_view(
            queryset=Story.objects.upcoming(),
            date_field="pub_date",
            month_format="%b",
            template_name="blog/story_detail.html",
            allow_future=True),
                       redirect_field_name=""),
        name='blog-story-detail-upcoming'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',
        PostDayArchiveView.as_view(
            model=Story, paginate_by=settings.DRESS_BLOG_PAGINATE_BY),
        name='blog-story-archive-day'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',
        PostMonthArchiveView.as_view(
            model=Story, paginate_by=settings.DRESS_BLOG_PAGINATE_BY),
        name='blog-story-archive-month'),
    url(r'^(?P<year>\d{4})/$',
        PostYearArchiveView.as_view(model=Story,
                                    paginate_by=2 *
                                    settings.DRESS_BLOG_PAGINATE_BY),
        name='blog-story-archive-year'),
    url(r'^tagged-as/(?P<slug>.{1,50})$',
        StoriesTaggedListView.as_view(),
        name='blog-tagged-story-list'),
    url(r'^$',
        PostListView.as_view(model=Story,
                             paginate_by=settings.DRESS_BLOG_PAGINATE_BY,
                             template_name="dress_blog/story_list.html"),
        name='blog-story-list'),
)
        name='blog-quote-detail-review'),

    # allowing access to an upcoming quote
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/upcoming/$',
        login_required(
            generic.DateDetailView.as_view(
                queryset=Quote.objects.upcoming(),
                date_field="pub_date", month_format="%b", 
                template_name="blog/quote_detail.html", allow_future=True),
            redirect_field_name=""),
        name='blog-quote-detail-upcoming'),

    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',
        PostDayArchiveView.as_view(model=Quote, paginate_by=page_size),
        name='blog-quote-archive-day'),

    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',
        PostMonthArchiveView.as_view(model=Quote, paginate_by=page_size),
        name='blog-quote-archive-month'),

    url(r'^(?P<year>\d{4})/$',
        PostYearArchiveView.as_view(model=Quote, paginate_by=large_page_size),
        name='blog-quote-archive-year'),

    url(r'^$', 
        PostListView.as_view(
            model=Quote, paginate_by=page_size,
            template_name="dress_blog/quote_list.html"),
        name='blog-quote-list'),
)
            redirect_field_name=""),
        name='blog-story-detail-review'),

    # allowing access to an upcoming storie
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/upcoming/$',
        login_required(
            generic.DateDetailView.as_view(
                queryset=Story.objects.upcoming(),
                date_field="pub_date", month_format="%b", 
                template_name="blog/story_detail.html", allow_future=True),
            redirect_field_name=""),
        name='blog-story-detail-upcoming'),

    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',
        PostDayArchiveView.as_view(model=Story, paginate_by=page_size),
        name='blog-story-archive-day'),

    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',
        PostMonthArchiveView.as_view(model=Story, paginate_by=page_size),
        name='blog-story-archive-month'),

    url(r'^(?P<year>\d{4})/$',
        PostYearArchiveView.as_view(model=Story, paginate_by=large_page_size),
        name='blog-story-archive-year'),

    url(r'^$', PostListView.as_view(
            model=Story, paginate_by=page_size,
            template_name="dress_blog/story_list.html"), 
        name='blog-story-list'),
)
Example #4
0
    url(r'^(?P<year>\d{4})/(?P<month>\w{3})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/upcoming/$',
        login_required(
            generic.DateDetailView.as_view(
                queryset=Quote.objects.upcoming(),
                date_field="pub_date", month_format="%b", 
                template_name="blog/quote_detail.html", allow_future=True),
            redirect_field_name=""),
        name='blog-quote-detail-upcoming'),

    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',
        PostDayArchiveView.as_view(
            model=Quote, paginate_by=settings.DRESS_BLOG_PAGINATE_BY),
        name='blog-quote-archive-day'),

    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',
        PostMonthArchiveView.as_view(
            model=Quote, paginate_by=settings.DRESS_BLOG_PAGINATE_BY),
        name='blog-quote-archive-month'),

    url(r'^(?P<year>\d{4})/$',
        PostYearArchiveView.as_view(
            model=Quote, paginate_by=2*settings.DRESS_BLOG_PAGINATE_BY),
        name='blog-quote-archive-year'),

    url(r'^$', 
        PostListView.as_view(
            model=Quote, paginate_by=settings.DRESS_BLOG_PAGINATE_BY,
            template_name="dress_blog/quote_list.html"),
        name='blog-quote-list'),
)
Example #5
0
            generic.DateDetailView.as_view(
                queryset=Story.objects.upcoming(),
                date_field="pub_date", month_format="%b", 
                template_name="blog/story_detail.html", allow_future=True),
            redirect_field_name=""),
        name='blog-story-detail-upcoming'),

    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',
        PostDayArchiveView.as_view(
            model=Story, paginate_by=settings.DRESS_BLOG_PAGINATE_BY),
        name='blog-story-archive-day'),

    url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',
        PostMonthArchiveView.as_view(
            model=Story, paginate_by=settings.DRESS_BLOG_PAGINATE_BY),
        name='blog-story-archive-month'),

    url(r'^(?P<year>\d{4})/$',
        PostYearArchiveView.as_view(
            model=Story, paginate_by=2*settings.DRESS_BLOG_PAGINATE_BY),
        name='blog-story-archive-year'),

    url(r'^tagged-as/(?P<slug>.{1,50})$', StoriesTaggedListView.as_view(),
        name='blog-tagged-story-list'),

    url(r'^$', PostListView.as_view(
            model=Story, paginate_by=settings.DRESS_BLOG_PAGINATE_BY,
            template_name="dress_blog/story_list.html"), 
        name='blog-story-list'),
)