~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to news/urls.py

  • Committer: franku
  • Date: 2018-09-12 07:45:35 UTC
  • mto: This revision was merged to the branch mainline in revision 500.
  • Revision ID: somal@arcor.de-20180912074535-4ucrq6kt9mqp8ai6
use the deleted username also for feeds; removed useless functions from feeds

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
 
4
6
 
5
7
urlpatterns = [
6
8
    url(r'^(?P<year>[0-9]{4})/(?P<month>[-\w]+)/(?P<day>[0-9]+)/(?P<slug>[-\w]+)/$',
7
9
        NewsDetail.as_view(),
8
10
        name='news_detail'),
9
 
 
10
11
    url(r'^(?P<year>\d{4})/(?P<month>[-\w]+)/$',
11
12
        MonthNews.as_view(),
12
13
        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
 
 
18
17
    url(r'^category/(?P<slug>[-\w]+)/',
19
18
        CategoryView.as_view(),
20
19
        name='category_posts'),
21
 
 
22
20
    url(r'^$',
23
21
        NewsList.as_view(template_name='news/post_list.html'),
24
22
        name='news_index'),
 
23
    # Feed
 
24
    url(r'^feeds/news/$', NewsPostsFeed()),
25
25
]