diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-11-07 17:46:07 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-11-07 17:46:07 +0000 |
commit | c9c5861f4dff4e7f40486924606cf6907c846efc (patch) | |
tree | 7d258a7a5eaef4fce613474b512ba881f52ac1b6 | |
parent | a0cd188a547af7d96111d41e05677d9e3d8a8eb9 (diff) | |
download | infrastructure-c9c5861f4dff4e7f40486924606cf6907c846efc.tar.gz |
openid_provider: Add a view for /
Previously / produced an error page, now we actually have an index page!
-rw-r--r-- | baserock_openid_provider/baserock_openid_provider/urls.py | 6 | ||||
-rw-r--r-- | baserock_openid_provider/baserock_openid_provider/views.py | 21 |
2 files changed, 24 insertions, 3 deletions
diff --git a/baserock_openid_provider/baserock_openid_provider/urls.py b/baserock_openid_provider/baserock_openid_provider/urls.py index ff980f93..2835388a 100644 --- a/baserock_openid_provider/baserock_openid_provider/urls.py +++ b/baserock_openid_provider/baserock_openid_provider/urls.py @@ -1,10 +1,10 @@ from django.conf.urls import patterns, include, url from django.contrib import admin +from . import views + urlpatterns = patterns('', - # Examples: - # url(r'^$', 'baserock_openid_provider.views.home', name='home'), - # url(r'^blog/', include('blog.urls')), + url(r'^$', views.index, name='index'), url(r'^accounts/', include('registration.backends.simple.urls')), url(r'^admin/', include(admin.site.urls)), diff --git a/baserock_openid_provider/baserock_openid_provider/views.py b/baserock_openid_provider/baserock_openid_provider/views.py new file mode 100644 index 00000000..5d80186e --- /dev/null +++ b/baserock_openid_provider/baserock_openid_provider/views.py @@ -0,0 +1,21 @@ +# Copyright (C) 2014 Codethink Limited +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +from django.shortcuts import render + + +def index(request): + return render(request, '../templates/index.html') |