X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ae60b2a3949e96357477cc04f90fd0873cee8a92..154870f0416b6b387637d6035c96321410512e95:/src/social/urls.py diff --git a/src/social/urls.py b/src/social/urls.py index f9222ce93..395e54ac1 100755 --- a/src/social/urls.py +++ b/src/social/urls.py @@ -2,26 +2,19 @@ # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # -from django.conf.urls import patterns, url +from django.conf.urls import url from django.views.decorators.cache import never_cache -from social.views import ObjectSetsFormView +from . import views -urlpatterns = patterns( - 'social.views', - url(r'^lektura/(?P[a-z0-9-]+)/lubie/$', 'like_book', name='social_like_book'), - url(r'^lektura/(?P[a-z0-9-]+)/nie_lubie/$', 'unlike_book', name='social_unlike_book'), - url(r'^lektura/(?P[a-z0-9-]+)/polki/$', never_cache(ObjectSetsFormView()), name='social_book_sets'), - url(r'^polka/$', 'my_shelf', name='social_my_shelf'), - # Includes - url(r'^cite/(?P\d+)\.(?P.+)\.html$', 'cite', name='social_cite'), - url(r'^cite_main/(?P\d+)\.(?P.+)\.html$', 'cite', {'main': True}, name='social_cite_main'), - url(r'^cite_info/(?P\d+).html$', 'cite_info', name='social_cite_info'), +urlpatterns = [ + url(r'^lektura/(?P[a-z0-9-]+)/lubie/$', views.like_book, name='social_like_book'), + url(r'^lektura/(?P[a-z0-9-]+)/nie_lubie/$', views.unlike_book, name='social_unlike_book'), + url(r'^lektura/(?P[a-z0-9-]+)/polki/$', never_cache(views.ObjectSetsFormView()), name='social_book_sets'), + url(r'^polka/$', views.my_shelf, name='social_my_shelf'), - # url(r'^polki/(?P[a-zA-Z0-9-]+)/formaty/$', 'shelf_book_formats', name='shelf_book_formats'), - # url(r'^polki/(?P[a-zA-Z0-9-]+)/(?P%s)/usun$' % SLUG, 'remove_from_shelf', name='remove_from_shelf'), - # url(r'^polki/$', 'user_shelves', name='user_shelves'), - # url(r'^polki/(?P[a-zA-Z0-9-]+)/usun/$', 'delete_shelf', name='delete_shelf'), - # url(r'^polki/(?P[a-zA-Z0-9-]+)\.zip$', 'download_shelf', name='download_shelf'), - # url(r'^polki/nowa/$', 'new_set', name='new_set'), -) + # Includes + url(r'^cite/(?P\d+)\.(?P.+)\.html$', views.cite, name='social_cite'), + url(r'^cite_main/(?P\d+)\.(?P.+)\.html$', views.cite, {'main': True}, name='social_cite_main'), + url(r'^cite_info/(?P\d+).html$', views.cite_info, name='social_cite_info'), +]