Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
950c3061
Commit
950c3061
authored
Nov 20, 2014
by
Daniel W Bond
Browse files
url separation, added django auth login
parent
f863ccd4
Changes
2
Hide whitespace changes
Inline
Side-by-side
roomlist/housing/urls.py
View file @
950c3061
...
@@ -4,9 +4,6 @@ from django.contrib import admin
...
@@ -4,9 +4,6 @@ from django.contrib import admin
admin
.
autodiscover
()
admin
.
autodiscover
()
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
url
(
r
'^$'
,
views
.
index
,
name
=
'index'
),
url
(
r
'^accounts/login/$'
,
views
.
login
,
name
=
'login'
),
url
(
r
'^accounts/logout/$'
,
views
.
logout_view
,
name
=
'logout_view'
),
url
(
r
'^buildings/$'
,
views
.
buildings
,
name
=
'buildings'
),
url
(
r
'^buildings/$'
,
views
.
buildings
,
name
=
'buildings'
),
url
(
r
'^building/(?P<buildingName>[a-zA-Z]+)$'
,
views
.
building
,
name
=
'building'
),
url
(
r
'^building/(?P<buildingName>[a-zA-Z]+)$'
,
views
.
building
,
name
=
'building'
),
)
)
roomlist/settings/urls.py
View file @
950c3061
...
@@ -4,10 +4,19 @@ from django.contrib import admin
...
@@ -4,10 +4,19 @@ from django.contrib import admin
admin
.
autodiscover
()
admin
.
autodiscover
()
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
# Examples:
# url(r'^$', 'django_project.views.home', name='home'),
# project-level urls
# url(r'^blog/', include('blog.urls')),
# url(r'^$', index.html
# url(r'^$', about.html
# login and logout
url
(
r
'^login/$'
,
'django.contrib.auth.views.login'
,
{
'template_name'
:
'login.html'
},
name
=
'login'
),
url
(
r
'logout/$'
,
'django.contrib.auth.views.logout'
,
{
'template_name'
:
'index.html'
},
name
=
'logout'
),
# app-level urls
url
(
r
'^housing/'
,
include
(
'housing.urls'
)),
# alternate interfaces
url
(
r
'^api/'
,
include
(
'api.urls'
)),
url
(
r
'^api/'
,
include
(
'api.urls'
)),
url
(
r
'^admin/'
,
include
(
admin
.
site
.
urls
)),
url
(
r
'^admin/'
,
include
(
admin
.
site
.
urls
)),
url
(
r
'^'
,
include
(
'housing.urls'
)),
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment