~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to news/urls.py

  • Committer: franku
  • Date: 2016-12-13 18:28:51 UTC
  • mto: This revision was merged to the branch mainline in revision 443.
  • Revision ID: somal@arcor.de-20161213182851-bo5ebf8pdvw5beua
run the script

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from django.conf.urls import *
2
2
from django.views.generic import ListView
3
3
from news.views import NewsList, YearNews, MonthNews, NewsDetail, CategoryView
4
 
from news.feeds import NewsPostsFeed
5
 
 
6
4
 
7
5
urlpatterns = [
8
6
    url(r'^(?P<year>[0-9]{4})/(?P<month>[-\w]+)/(?P<day>[0-9]+)/(?P<slug>[-\w]+)/$',
9
7
        NewsDetail.as_view(),
10
8
        name='news_detail'),
 
9
 
11
10
    url(r'^(?P<year>\d{4})/(?P<month>[-\w]+)/$',
12
11
        MonthNews.as_view(),
13
12
        name='news_archive_month'),
 
13
 
14
14
    url(r'^(?P<year>\d{4})/$',
15
15
        YearNews.as_view(),
16
16
        name='news_archive_year'),
 
17
 
17
18
    url(r'^category/(?P<slug>[-\w]+)/',
18
19
        CategoryView.as_view(),
19
20
        name='category_posts'),
 
21
 
20
22
    url(r'^$',
21
23
        NewsList.as_view(template_name='news/post_list.html'),
22
24
        name='news_index'),
23
 
    # Feed
24
 
    url(r'^feed/$', NewsPostsFeed())
25
25
]