=== modified file 'lava_server/urls.py'
@@ -24,6 +24,7 @@
from linaro_django_xmlrpc import urls as api_urls
from lava_server.extension import loader
+from lava_server.views import index, version
# Enable admin stuff
@@ -33,10 +34,8 @@
# Root URL patterns
urlpatterns = patterns(
'',
- url(r'^' + settings.APP_URL_PREFIX + r'$', direct_to_template,
- name='lava.home', kwargs={'template': 'index.html'}),
- url(r'^' + settings.APP_URL_PREFIX + r'version/$', direct_to_template,
- name='lava.version_details', kwargs={'template': 'version_details.html'}),
+ url(r'^' + settings.APP_URL_PREFIX + r'$', index, name='lava.home')
+ url(r'^' + settings.APP_URL_PREFIX + r'version/$', version, name='lava.version_details'),
url(r'^' + settings.APP_URL_PREFIX + r'accounts/', include('django.contrib.auth.urls')),
url(r'^' + settings.APP_URL_PREFIX + r'admin/', include(admin.site.urls)),
url(r'^' + settings.APP_URL_PREFIX + r'openid/', include('django_openid_auth.urls')),
=== added file 'lava_server/views.py'
@@ -0,0 +1,29 @@
+# Copyright (C) 2010, 2011 Linaro Limited
+#
+# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
+#
+# This file is part of LAVA Server.
+#
+# LAVA Server is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License version 3
+# as published by the Free Software Foundation
+#
+# LAVA Server 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 Affero General Public License
+# along with LAVA Server. If not, see <http://www.gnu.org/licenses/>.
+
+from django.views.generic.simple import direct_to_template
+
+
+def index(request):
+ return direct_to_template(
+ template='index.html')
+
+
+def version(request):
+ return direct_to_template(
+ template='version_details.html')