Cleanup of the Reddit app, now uses Class views

This commit is contained in:
2011-09-09 14:20:13 +01:00
parent 0b6d97e2f6
commit 8f914a98ac
7 changed files with 102 additions and 56 deletions

View File

@@ -1,12 +1,9 @@
from django.conf.urls.defaults import *
from django.contrib.auth.decorators import login_required
from reddit import views
urlpatterns = patterns('',
(r'^profile/add/reddit', views.reddit_add),
(r'^profile/del/reddit/$', views.reddit_del),
(r'^profile/del/reddit/(?P<redditid>\d+)/$', views.reddit_del),
url(r'^profile/add/reddit', login_required(views.RedditAddAccount.as_view()), name='reddit-addaccount'),
url(r'^profile/del/reddit/(?P<slug>\d+)/$', login_required(views.RedditDeleteAccount.as_view()), name='reddit-delaccount'),
url(r'^reddit/comments.json$', views.RedditCommentsJSON.as_view(), name='reddit-commentsjson'),
)