summaryrefslogtreecommitdiff
path: root/app/figments/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/figments/urls.py')
-rw-r--r--app/figments/urls.py42
1 files changed, 29 insertions, 13 deletions
diff --git a/app/figments/urls.py b/app/figments/urls.py
index 7dfa328..2114792 100644
--- a/app/figments/urls.py
+++ b/app/figments/urls.py
@@ -1,15 +1,31 @@
-from django.conf.urls import *
-from django.views.generic import ListView, DetailView
+from django.conf.urls import url
-from .models import Figment, Series
+from . import views
-urlpatterns = patterns('',
- url(r'^(?P<slug>[-\w]+)/$', DetailView.as_view(
- model=Figment,
- template_name="details/figments.html"
- )),
- url(r'^$', ListView.as_view(
- queryset=Figment.objects.filter(status__exact=1).order_by('-pub_date'),
- template_name="archives/figments.html",
- )),
-)
+urlpatterns = [
+ url(
+ regex=r'^feed.xml',
+ view=views.FigRSSFeedView(),
+ name="feed"
+ ),
+ url(
+ regex=r'series/$',
+ view=views.SeriesListView.as_view(),
+ name='list_series'
+ ),
+ url(
+ regex=r'(?P<slug>[-\w]+).txt$',
+ view=views.FigmentDetailViewTXT.as_view(),
+ name="detail-txt"
+ ),
+ url(
+ regex=r'(?P<slug>[-\w]+)$',
+ view=views.FigmentDetailView.as_view(),
+ name='detail'
+ ),
+ url(
+ regex=r'^$',
+ view=views.FigmentListView.as_view(),
+ name='list'
+ ),
+]