예제 #1
0
 ),
 url(
     regex='^send-to-slack/$',
     view=SlackMessageView.as_view(),
     kwargs={},
     name='send_to_slack',
 ),
 url(
     regex='^rss/$',
     view=cache_page(FEED_CACHE_TIME)(ArticleFeed()),
     kwargs={},
     name='homepage_feed',
 ),
 url(
     regex='^category/(?P<category>[-\w]+)/$',
     view=cache_page(STANDARD_CACHE_TIME)(ArticleList.as_view()),
     kwargs={},
     name='article_list_by_category',
 ),
 url(
     regex='^category/(?P<category>[-\w]+)/rss/$',
     view=cache_page(FEED_CACHE_TIME)(ArticleFeed()),
     kwargs={},
     name='article_list_by_category_feed',
 ),
 url(
     regex='^(?P<section>[-\w]+)/$',
     view=cache_page(STANDARD_CACHE_TIME)(ArticleList.as_view()),
     kwargs={},
     name='article_list_by_section',
 ),
예제 #2
0
파일: urls.py 프로젝트: gauravss123/source
 ),
 url(
     regex = '^clear-cache/$',
     view = ClearCache.as_view(),
     kwargs = {},
     name = 'clear_cache',
 ),
 url(
     regex = '^rss/$',
     view = cache_page(ArticleFeed(), FEED_CACHE_TIME),
     kwargs = {},
     name = 'homepage_feed',
 ),
 url(
     regex = '^category/(?P<category>[-\w]+)/$',
     view = cache_page(ArticleList.as_view(), STANDARD_CACHE_TIME),
     kwargs = {},
     name = 'article_list_by_category',
 ),
 url(
     regex = '^category/(?P<category>[-\w]+)/rss/$',
     view = cache_page(ArticleFeed(), FEED_CACHE_TIME),
     kwargs = {},
     name = 'article_list_by_category_feed',
 ),
 url(
     regex = '^(?P<section>[-\w]+)/$',
     view = cache_page(ArticleList.as_view(), STANDARD_CACHE_TIME),
     kwargs = {},
     name = 'article_list_by_section',
 ),
예제 #3
0
파일: urls.py 프로젝트: miguelpaz/source
from django.conf.urls.defaults import *
from django.views.decorators.cache import cache_page

from .feeds import ArticleFeed
from haystack.forms import SearchForm
from haystack.views import SearchView, search_view_factory
from source.articles.views import ArticleList, CATEGORY_MAP, SECTION_MAP

article_category_options = "|".join(CATEGORY_MAP.keys())

urlpatterns = patterns(
    '',
    url(
        regex='^$',
        view=ArticleList.as_view(template_name='homepage.html'),
        kwargs={},
        name='homepage',
    ),
    url(
        regex='^rss/$',
        view=cache_page(ArticleFeed(), 60 * 15),
        kwargs={},
        name='homepage_feed',
    ),
    url(
        regex='^(?P<section>articles)/$',
        view=ArticleList.as_view(),
        kwargs={},
        name='article_list_by_section',
    ),
    url(
예제 #4
0
 url(
     regex = '^$',
     view = HomepageView.as_view(template_name='homepage.html'),
     kwargs = {},
     name = 'homepage',
 ),
 url(
     regex = '^rss/$',
     view = cache_page(ArticleFeed(), 60*15),
     kwargs = {},
     name = 'homepage_feed',
 ),
 # matching /articles/ here to offer future support for multiple sections
 url(
     regex = '^(?P<section>articles)/$',
     view = ArticleList.as_view(),
     kwargs = {},
     name = 'article_list_by_section',
 ),
 url(
     regex = '^(?P<section>articles)/rss/$',
     view = cache_page(ArticleFeed(), 60*15),
     kwargs = {},
     name = 'article_list_by_section_feed',
 ),
 url(
     regex = '^category/(?P<category>%s)/$' % article_category_options,
     view = ArticleList.as_view(),
     kwargs = {},
     name = 'article_list_by_category',
 ),
예제 #5
0
파일: urls.py 프로젝트: miguelpaz/source
from django.conf.urls.defaults import *
from django.views.decorators.cache import cache_page

from .feeds import ArticleFeed
from haystack.forms import SearchForm
from haystack.views import SearchView, search_view_factory
from source.articles.views import ArticleList, CATEGORY_MAP, SECTION_MAP

article_category_options = "|".join(CATEGORY_MAP.keys())

urlpatterns = patterns('',
    url(
        regex = '^$',
        view = ArticleList.as_view(template_name='homepage.html'),
        kwargs = {},
        name = 'homepage',
    ),
    url(
        regex = '^rss/$',
        view = cache_page(ArticleFeed(), 60*15),
        kwargs = {},
        name = 'homepage_feed',
    ),
    url(
        regex = '^(?P<section>articles)/$',
        view = ArticleList.as_view(),
        kwargs = {},
        name = 'article_list_by_section',
    ),
    url(
        regex = '^(?P<section>articles)/rss/$',