From patchwork Tue Oct 11 10:35:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zygmunt Krynicki X-Patchwork-Id: 4616 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 723CB23DEF for ; Tue, 11 Oct 2011 10:35:16 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 21371A18301 for ; Tue, 11 Oct 2011 10:35:16 +0000 (UTC) Received: by ywp31 with SMTP id 31so9756955ywp.11 for ; Tue, 11 Oct 2011 03:35:15 -0700 (PDT) Received: by 10.223.85.139 with SMTP id o11mr38795820fal.0.1318329315069; Tue, 11 Oct 2011 03:35:15 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.24.41 with SMTP id r9cs152875laf; Tue, 11 Oct 2011 03:35:14 -0700 (PDT) Received: by 10.216.138.11 with SMTP id z11mr624824wei.38.1318329313848; Tue, 11 Oct 2011 03:35:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id h50si15801422wed.110.2011.10.11.03.35.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 11 Oct 2011 03:35:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RDZg1-0008Rb-AL for ; Tue, 11 Oct 2011 10:35:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 41422E03DF for ; Tue, 11 Oct 2011 10:35:13 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-server X-Launchpad-Branch: ~linaro-validation/lava-server/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 253 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-server/trunk] Rev 253: Move index and version view to a dedicated view module Message-Id: <20111011103513.21793.59116.launchpad@ackee.canonical.com> Date: Tue, 11 Oct 2011 10:35:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14124"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: efb5c2a968fc075322177530048a44712de5fac0 ------------------------------------------------------------ revno: 253 committer: Zygmunt Krynicki branch nick: trunk timestamp: Thu 2011-10-06 22:09:17 +0200 message: Move index and version view to a dedicated view module added: lava_server/views.py modified: lava_server/urls.py --- lp:lava-server https://code.launchpad.net/~linaro-validation/lava-server/trunk You are subscribed to branch lp:lava-server. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription === modified file 'lava_server/urls.py' --- lava_server/urls.py 2011-09-23 08:25:04 +0000 +++ lava_server/urls.py 2011-10-06 20:09:17 +0000 @@ -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' --- lava_server/views.py 1970-01-01 00:00:00 +0000 +++ lava_server/views.py 2011-10-06 20:09:17 +0000 @@ -0,0 +1,29 @@ +# Copyright (C) 2010, 2011 Linaro Limited +# +# Author: Zygmunt Krynicki +# +# 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 . + +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')