Commit 950c3061 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

url separation, added django auth login

parent f863ccd4
...@@ -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'),
) )
...@@ -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')),
) )
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