summaryrefslogtreecommitdiff
path: root/app/src/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/urls.py')
-rw-r--r--app/src/urls.py65
1 files changed, 50 insertions, 15 deletions
diff --git a/app/src/urls.py b/app/src/urls.py
index a2368e3..217912c 100644
--- a/app/src/urls.py
+++ b/app/src/urls.py
@@ -1,17 +1,52 @@
-from django.conf.urls import *
-from django.views.generic import ListView
+from django.conf.urls import url, include
-from .models import Entry, Book
+from . import views
-urlpatterns = patterns('',
- (r'topic/(?P<slug>[-\w]+)/$', 'src.views.topic'),
- (r'books/$', ListView.as_view(
- queryset=Book.objects.filter(status__exact=1).order_by('-pub_date'),
- template_name="archives/src_books.html",
- )),
- (r'(?P<slug>[-\w]+)/$', 'src.views.detail'),
- (r'^$', ListView.as_view(
- queryset=Entry.objects.filter(status__exact=1).order_by('-pub_date'),
- template_name="archives/src_home.html",
- )),
-)
+
+urlpatterns = [
+ url(
+ regex=r'^feed.xml',
+ view=views.SrcRSSFeedView(),
+ name="feed"
+ ),
+ url(
+ r'^something/paypal/',
+ include('paypal.standard.ipn.urls'),
+ name="paypal-ipn"
+ ),
+ url(
+ regex=r'topic/(?P<slug>[-\w]+)$',
+ view=views.TopicListView.as_view(),
+ name="list_topics"
+ ),
+ url(
+ regex=r'books/(?P<slug>[-\w]+)$',
+ view=views.BookDetailView.as_view(),
+ name='detail_book'
+ ),
+ url(
+ regex=r'books/$',
+ view=views.BookListView.as_view(),
+ name='list_books'
+ ),
+ url(
+ regex=r'(?P<slug>[-\w]+).txt$',
+ view=views.EntryDetailViewTXT.as_view(),
+ name="detail-txt"
+ ),
+ url(
+ regex=r'(?P<slug>[-\w]+).amp$',
+ view=views.EntryDetailViewAMP.as_view(),
+ name="detail-amp"
+ ),
+ url(
+ regex=r'(?P<slug>[-\w]+)$',
+ view=views.EntryDetailView.as_view(),
+ name="detail"
+ ),
+ url(
+ regex=r'^$',
+ view=views.SrcListView.as_view(),
+ name="list",
+ ),
+]