forked from CGM_Public/pretix_original
Migrate to Django 1.8-style URLconfigs
See https://docs.djangoproject.com/en/dev/releases/1.8/#django-conf-urls-patterns and #14
This commit is contained in:
@@ -1,23 +1,15 @@
|
|||||||
from django.conf.urls import patterns, url, include
|
from django.conf.urls import url, include
|
||||||
from pretix.control.views import main, event, item
|
|
||||||
|
|
||||||
urlpatterns = patterns('',)
|
|
||||||
urlpatterns += patterns(
|
from pretix.control.views import main, event, item, auth
|
||||||
'pretix.control.views.auth',
|
|
||||||
url(r'^logout$', 'logout', name='auth.logout'),
|
urlpatterns = [
|
||||||
url(r'^login$', 'login', name='auth.login'),
|
url(r'^logout$', auth.logout, name='auth.logout'),
|
||||||
)
|
url(r'^login$', auth.login, name='auth.login'),
|
||||||
urlpatterns += patterns(
|
url(r'^$', main.index, name='index'),
|
||||||
'pretix.control.views.main',
|
|
||||||
url(r'^$', 'index', name='index'),
|
|
||||||
url(r'^events/$', main.EventList.as_view(), name='events'),
|
url(r'^events/$', main.EventList.as_view(), name='events'),
|
||||||
)
|
url(r'^event/(?P<organizer>[^/]+)/(?P<event>[^/]+)/', include([
|
||||||
urlpatterns += patterns(
|
url(r'^$', event.index, name='event.index'),
|
||||||
'pretix.control.views.event',
|
|
||||||
url(r'^event/(?P<organizer>[^/]+)/(?P<event>[^/]+)/', include(
|
|
||||||
patterns(
|
|
||||||
'pretix.control.views',
|
|
||||||
url(r'^$', 'event.index', name='event.index'),
|
|
||||||
url(r'^settings/$', event.EventUpdate.as_view(), name='event.settings'),
|
url(r'^settings/$', event.EventUpdate.as_view(), name='event.settings'),
|
||||||
url(r'^settings/plugins$', event.EventPlugins.as_view(), name='event.settings.plugins'),
|
url(r'^settings/plugins$', event.EventPlugins.as_view(), name='event.settings.plugins'),
|
||||||
url(r'^settings/payment$', event.PaymentSettings.as_view(), name='event.settings.payment'),
|
url(r'^settings/payment$', event.PaymentSettings.as_view(), name='event.settings.payment'),
|
||||||
@@ -54,6 +46,5 @@ urlpatterns += patterns(
|
|||||||
url(r'^quotas/(?P<quota>[0-9a-f-]+)/delete$', item.QuotaDelete.as_view(),
|
url(r'^quotas/(?P<quota>[0-9a-f-]+)/delete$', item.QuotaDelete.as_view(),
|
||||||
name='event.items.quotas.delete'),
|
name='event.items.quotas.delete'),
|
||||||
url(r'^quotas/add$', item.QuotaCreate.as_view(), name='event.items.quotas.add'),
|
url(r'^quotas/add$', item.QuotaCreate.as_view(), name='event.items.quotas.add'),
|
||||||
)
|
])),
|
||||||
))
|
]
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from django.conf.urls import patterns, url, include
|
from django.conf.urls import url, include
|
||||||
|
|
||||||
import pretix.presale.views.event
|
import pretix.presale.views.event
|
||||||
import pretix.presale.views.cart
|
import pretix.presale.views.cart
|
||||||
@@ -6,11 +6,8 @@ import pretix.presale.views.checkout
|
|||||||
import pretix.presale.views.order
|
import pretix.presale.views.order
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns(
|
urlpatterns = [
|
||||||
'',
|
url(r'^(?P<organizer>[^/]+)/(?P<event>[^/]+)/', include([
|
||||||
url(r'^(?P<organizer>[^/]+)/(?P<event>[^/]+)/', include(
|
|
||||||
patterns(
|
|
||||||
'pretix.presale.views.event',
|
|
||||||
url(r'^$', pretix.presale.views.event.EventIndex.as_view(), name='event.index'),
|
url(r'^$', pretix.presale.views.event.EventIndex.as_view(), name='event.index'),
|
||||||
url(r'^cart/add$', pretix.presale.views.cart.CartAdd.as_view(), name='event.cart.add'),
|
url(r'^cart/add$', pretix.presale.views.cart.CartAdd.as_view(), name='event.cart.add'),
|
||||||
url(r'^cart/remove$', pretix.presale.views.cart.CartRemove.as_view(), name='event.cart.remove'),
|
url(r'^cart/remove$', pretix.presale.views.cart.CartRemove.as_view(), name='event.cart.remove'),
|
||||||
@@ -24,6 +21,5 @@ urlpatterns = patterns(
|
|||||||
url(r'^order/(?P<order>[^/]+)/cancel$', pretix.presale.views.order.OrderCancel.as_view(),
|
url(r'^order/(?P<order>[^/]+)/cancel$', pretix.presale.views.order.OrderCancel.as_view(),
|
||||||
name='event.order.cancel'),
|
name='event.order.cancel'),
|
||||||
url(r'^login$', pretix.presale.views.event.EventLogin.as_view(), name='event.checkout.login'),
|
url(r'^login$', pretix.presale.views.event.EventLogin.as_view(), name='event.checkout.login'),
|
||||||
)
|
])),
|
||||||
)),
|
]
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from django.conf.urls import patterns, include, url
|
from django.conf.urls import include, url
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
@@ -6,19 +6,19 @@ import pretix.control.urls
|
|||||||
import pretix.presale.urls
|
import pretix.presale.urls
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = [
|
||||||
url(r'^control/', include(pretix.control.urls, namespace='control')),
|
url(r'^control/', include(pretix.control.urls, namespace='control')),
|
||||||
url(r'^admin/', include(admin.site.urls)),
|
url(r'^admin/', include(admin.site.urls)),
|
||||||
# The pretixpresale namespace is configured at the bottom of this file, because it
|
# The pretixpresale namespace is configured at the bottom of this file, because it
|
||||||
# contains a wildcard-style URL which has to be configured _after_ debug settings.
|
# contains a wildcard-style URL which has to be configured _after_ debug settings.
|
||||||
)
|
]
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
import debug_toolbar
|
import debug_toolbar
|
||||||
urlpatterns += patterns('',
|
urlpatterns.append(
|
||||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||||
)
|
)
|
||||||
|
|
||||||
urlpatterns += patterns('',
|
urlpatterns.append(
|
||||||
url(r'', include(pretix.presale.urls, namespace='presale'))
|
url(r'', include(pretix.presale.urls, namespace='presale'))
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user