Skip to content

Commit c3e14a6

Browse files
author
Emmanouil Konstantinidis
committed
Revert demo app
1 parent b7ae772 commit c3e14a6

File tree

3 files changed

+5
-32
lines changed

3 files changed

+5
-32
lines changed

demo/project/organisations/urls.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
import django
21
from django.conf.urls import url
32
from project.organisations import views
43

54

6-
organisations_urlpatterns = [
5+
urlpatterns = [
6+
77
url(r'^create/$', view=views.CreateOrganisationView.as_view(), name="create"),
8+
url(r'^(?P<slug>[\w-]+)/members/$', view=views.OrganisationMembersView.as_view(), name="members"),
89
url(r'^(?P<slug>[\w-]+)/leave/$', view=views.LeaveOrganisationView.as_view(), name="leave")
9-
]
1010

11-
members_urlpatterns = [
12-
url(r'^(?P<slug>[\w-]+)/members/$', view=views.OrganisationMembersView.as_view(), name="members"),
1311
]
14-
15-
# Django 1.9 Support for the app_name argument is deprecated
16-
# https://docs.djangoproject.com/en/1.9/ref/urls/#include
17-
django_version = django.VERSION
18-
if django.VERSION[:2] >= (1, 9, ):
19-
organisations_urlpatterns = (organisations_urlpatterns, 'organisations_app', )
20-
members_urlpatterns = (members_urlpatterns, 'organisations_app', )

demo/project/settings.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
"""
22
Django settings for demo project.
3-
43
Generated by 'django-admin startproject' using Django 1.8.7.
5-
64
For more information on this file, see
75
https://docs.djangoproject.com/en/1.8/topics/settings/
8-
96
For the full list of settings and their values, see
107
https://docs.djangoproject.com/en/1.8/ref/settings/
118
"""
@@ -43,6 +40,7 @@
4340

4441
'project.accounts',
4542
'project.organisations',
43+
4644
)
4745

4846
MIDDLEWARE_CLASSES = (

demo/project/urls.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""demo URL Configuration
2-
32
The `urlpatterns` list routes URLs to views. For more information please see:
43
https://docs.djangoproject.com/en/1.8/topics/http/urls/
54
Examples:
@@ -13,29 +12,14 @@
1312
1. Add an import: from blog import urls as blog_urls
1413
2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls))
1514
"""
16-
import django
1715
from django.conf.urls import include, url
1816
from django.contrib import admin
19-
from .organisations.urls import organisations_urlpatterns, members_urlpatterns
2017

2118
urlpatterns = [
2219
url(r'^admin/', include(admin.site.urls)),
2320
url(r'^docs/', include('rest_framework_docs.urls')),
2421

2522
# API
2623
url(r'^accounts/', view=include('project.accounts.urls', namespace='accounts')),
24+
url(r'^organisations/', view=include('project.organisations.urls', namespace='organisations')),
2725
]
28-
29-
# Django 1.9 Support for the app_name argument is deprecated
30-
# https://docs.djangoproject.com/en/1.9/ref/urls/#include
31-
django_version = django.VERSION
32-
if django.VERSION[:2] >= (1, 9, ):
33-
urlpatterns.extend([
34-
url(r'^organisations/', view=include(organisations_urlpatterns, namespace='organisations')),
35-
url(r'^members/', view=include(members_urlpatterns, namespace='members')),
36-
])
37-
else:
38-
urlpatterns.extend([
39-
url(r'^organisations/', view=include(organisations_urlpatterns, namespace='organisations', app_name='organisations_app')),
40-
url(r'^members/', view=include(members_urlpatterns, namespace='members', app_name='organisations_app')),
41-
])

0 commit comments

Comments
 (0)