Fix deprecation errors by providing app_nam in urls.py

See
https://docs.djangoproject.com/en/1.10/topics/http/urls/#namespaces-and-include
parent 7027d4d7
......@@ -6,6 +6,7 @@ from django.conf.urls import url
from . import views
app_name = "activemembers"
urlpatterns = [
url(r'committees/$', views.committee_index, name='committees'),
url(r'^committees/(?P<id>\d)/$', views.committee_detail, name='committee'),
......
......@@ -3,6 +3,7 @@ from django.conf.urls import include, url
from . import views
app_name = "documents"
urlpatterns = [
url('^miscellaneous/(?P<pk>[0-9]*)', views.get_miscellaneous_document,
name='miscellaneous-document'),
......
......@@ -4,6 +4,7 @@ from django.views.generic.base import RedirectView
from . import views
app_name = "education"
urlpatterns = [
url('^exam/(?P<id>[0-9]*)/$', views.exam, name="exam"),
url('^summary/(?P<id>[0-9]*)/$', views.summary, name="summary"),
......
......@@ -8,6 +8,8 @@ from events.feeds import EventFeed
from . import views
app_name = "events"
urlpatterns = [
url(r'admin/(?P<event_id>\d+)/$', views.admin_details, name='admin-details'),
url(r'admin/(?P<event_id>\d+)/registration/(?P<action>[-\w]+)/$',
......
......@@ -2,6 +2,8 @@ from django.conf.urls import include, url
from . import views
app_name = "mailinglists"
urlpatterns = [
url('^', views.index, name='index'),
]
......@@ -2,8 +2,12 @@ from django.conf.urls import url
from . import views
app_name = "members"
urlpatterns = [
url('^become-a-member-document/(?P<pk>[0-9]*)', views.get_become_a_member_document, name='become-a-member-document'),
url('^become-a-member-document/(?P<pk>[0-9]*)',
views.get_become_a_member_document,
name='become-a-member-document'),
url('^profile/(?P<pk>[0-9]*)$', views.profile, name='profile'),
url('^profile$', views.profile, name='profile'),
url('^profile/edit/$', views.edit_profile, name='edit-profile'),
......
......@@ -2,6 +2,8 @@ from django.conf.urls import url
from . import views
app_name = "merchandise"
urlpatterns = [
url(r'^$', views.index, name='index'),
]
......@@ -2,6 +2,8 @@ from django.conf.urls import url
from . import views
app_name = "newsletters"
urlpatterns = [
url('^(?P<pk>\d+)/$', views.preview, name='preview'),
url(r'admin/send/(?P<pk>\d+)/$', views.admin_send, name='admin-send'),
......
......@@ -3,6 +3,7 @@ from django.conf.urls import url
from . import views
app_name = "partners"
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^partners/(?P<slug>[-\w]+)$', views.partner, name='partner'),
......
......@@ -2,6 +2,8 @@ from django.conf.urls import url
from . import views
app_name = "photos"
urlpatterns = [
url(r'^download/(?P<path>.*)', views.download, name='download'),
url(r'^shared-download/(?P<slug>[-\w]+)/(?P<token>[a-zA-Z0-9]+)/(?P<path>.*)', views.shared_download, name='shared-download'),
......
......@@ -2,6 +2,8 @@ from django.conf.urls import url
from . import views
app_name = "pizzas"
urlpatterns = [
url(r'^delete-order/$', views.delete_order, name='delete-order'),
url(r'^add-order/(?P<event_pk>\d+)/$', views.add_order, name='add-order'),
......
......@@ -2,6 +2,8 @@ from django.conf.urls import url
from . import views
app_name = "thabloid"
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^viewer/(?P<year>[0-9]{4})/(?P<issue>[0-9]+)/$', views.viewer, name='viewer'),
......
......@@ -50,33 +50,32 @@ thalia_sitemap.update(partners_sitemap)
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='index.html'), name='index'),
url(r'^admin/', admin.site.urls),
url(r'^mailinglists/', include('mailinglists.urls', namespace='mailinglists')),
url(r'^members/', include('members.urls', namespace='members')),
url(r'^mailinglists/', include('mailinglists.urls')),
url(r'^members/', include('members.urls')),
url(r'^nyi$', TemplateView.as_view(template_name='status/nyi.html'), name='#'),
url(r'^events/', include('events.urls', namespace='events')),
url(r'^pizzas/', include('pizzas.urls', namespace='pizzas')),
url(r'^events/', include('events.urls')),
url(r'^pizzas/', include('pizzas.urls')),
url(r'^index\.php/events/ical/feed\.ics', DeprecationFeed()),
url(r'^newsletters/', include('newsletters.urls',
namespace='newsletters')),
url(r'^newsletters/', include('newsletters.urls')),
url(r'^association$', TemplateView.as_view(
template_name='singlepages/association.html'), name='association'),
url(r'^association/', include([
url(r'^activemembers/', include('activemembers.urls', namespace='activemembers')),
url(r'^merchandise/', include('merchandise.urls', namespace='merchandise')),
url(r'^documents/', include('documents.urls', namespace='documents')),
url(r'^activemembers/', include('activemembers.urls')),
url(r'^merchandise/', include('merchandise.urls')),
url(r'^documents/', include('documents.urls')),
url(r'^become-a-member/', members.views.become_a_member, name='become-a-member'),
url(r'^sister-associations', TemplateView.as_view(template_name='singlepages/sister_associations.html'), name='sister-associations'),
url(r'^thabloid/', include('thabloid.urls', namespace='thabloid')),
url(r'^thabloid/', include('thabloid.urls')),
])),
url(r'^for-members$', TemplateView.as_view(
template_name='singlepages/for_members.html'), name='for-members'),
url(r'^for-members/', include([
url(r'^become-active', TemplateView.as_view(template_name='singlepages/become_active.html'), name='become-active'),
url(r'^photos/', include('photos.urls', namespace='photos')),
url(r'^photos/', include('photos.urls')),
url(r'^statistics/', members.views.statistics, name='statistics'),
url(r'^styleguide/', TemplateView.as_view(template_name='singlepages/styleguide.html'), name='styleguide'),
])),
url(r'^career/', include('partners.urls', namespace='partners')),
url(r'^career/', include('partners.urls')),
url(r'^contact$', TemplateView.as_view(template_name='singlepages/contact.html'), name='contact'),
url(r'^private-thumbnails/(?P<size_fit>\d+x\d+_[01])/(?P<path>.*)', private_thumbnails, name='private-thumbnails'),
url(r'^generate-thumbnail/(?P<size_fit>\d+x\d+_[01])/(?P<path>[^/]+)/(?P<thumbpath>[^/]+)', generate_thumbnail, name='generate-thumbnail'),
......@@ -86,7 +85,7 @@ urlpatterns = [
url(r'^', include('partners.api.urls')),
url(r'wikilogin', views.wiki_login),
])),
url(r'^education/', include('education.urls', namespace='education')),
url(r'^education/', include('education.urls')),
# Default login helpers
url(r'^', include('django.contrib.auth.urls')),
url(r'^i18n/', include('django.conf.urls.i18n')),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment