Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changing the way a template is declared for the builder

  • Loading branch information...
commit 1a1ac444503273f1293c25885385134abb80cf44 1 parent 799d0d9
@anutron authored
Showing with 6 additions and 5 deletions.
  1. +4 −2 django/src/depender/urls.py
  2. +2 −3 django/src/depender/views.py
View
6 django/src/depender/urls.py
@@ -4,9 +4,11 @@
import os
urlpatterns = patterns('',
- url(r'^build$', 'depender.views.build'),
url(r'^$', 'depender.views.builder'),
+ url(r'^build$', 'depender.views.build'),
url(r'^test$', 'depender.views.test'),
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': os.path.join(os.path.dirname(__file__), '..', '..', '..', 'styles')}),
-)
+ url(r'^(?P<template>.*)', 'depender.views.builder'),
+
+)
View
5 django/src/depender/views.py
@@ -135,9 +135,8 @@ def get_arr(name):
return response
build.login_notrequired = True
-def builder(request):
+def builder(request, template='packager'):
dpdr = get_depender(False)
- template = request.REQUEST.get('template', 'packager.mako')
packages = {}
#Core, More, etc
for p in settings.BUILDER_PACKAGES:
@@ -156,7 +155,7 @@ def get_provides(package, filename):
return [pc[1] for pc in packages[package][filename]['provides']]
def get_depends(package, filename):
return [pc[0] + '/' + pc[1] for pc in packages[package][filename]['requires']]
- return render_to_response(template,
+ return render_to_response(template + '.mako',
{
'packages': settings.BUILDER_PACKAGES,
'package_data': packages,
Please sign in to comment.
Something went wrong with that request. Please try again.