|
From: <bms...@us...> - 2007-11-10 22:43:21
|
Revision: 2593
http://morphix.svn.sourceforge.net/morphix/?rev=2593&view=rev
Author: bmsleight
Date: 2007-11-10 14:43:18 -0800 (Sat, 10 Nov 2007)
Log Message:
-----------
Adding click-though java terms
Modified Paths:
--------------
trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html
trunk/morphixlivekiosk/scripts/mbuild/templates/index.html
trunk/morphixlivekiosk/scripts/mbuild/templates/master.xml
trunk/morphixlivekiosk/scripts/mbuild/templates/template.html
trunk/morphixlivekiosk/scripts/mbuild/urls.py
trunk/morphixlivekiosk/scripts/mbuild/web/models.py
trunk/morphixlivekiosk/scripts/mbuild/web/views.py
Added Paths:
-----------
trunk/morphixlivekiosk/scripts/mbuild/templates/delete-queue.html
trunk/morphixlivekiosk/scripts/mbuild/templates/java-terms-accept.html
trunk/morphixlivekiosk/scripts/mbuild/templates/status.html
Added: trunk/morphixlivekiosk/scripts/mbuild/templates/delete-queue.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/delete-queue.html (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/delete-queue.html 2007-11-10 22:43:18 UTC (rev 2593)
@@ -0,0 +1,8 @@
+<h1>Custom Built Kiosk LiveCD</h1>
+
+{% if queue_list %}
+ <p><a href=/mbuild/status/{{ queue_list.template }}/>{{ queue_list.template }}</a> <a href=http://{{ queue_list.homepage }}>{{ queue_list.brand }}</a> - Has been built ? {{ queue_list.built }} </p>
+ <p>{{ queue_list.builtdomain }}, {{ queue_list.builtiso }}, {{ queue_list.builtjpg }}, {{ queue_list.builtogg}}
+{% else %}
+ <p>No template in current queue.</p>
+{% endif %}
\ No newline at end of file
Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html 2007-11-10 00:25:57 UTC (rev 2592)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html 2007-11-10 22:43:18 UTC (rev 2593)
@@ -1,12 +1,7 @@
<h1>Custom Built Kiosk LiveCD</h1>
-<h2>Status</h2>
-{% if newtemplate.built %}
- <p>Email has been sent, build is complete <p>
-{% else %}
- <p>You build request is XXX in the list<p>
-{% endif %}
-<p>In the meatime - have a look at the <a href=/view-queue/>queue of built and yet to be build kiosks</a><p>
-<p>Will send an email when the elves have built the kiosk.<p>
-
-<p><a href=/templates/{{newtemplate.template}}>Raw Template.xml</a><p>
-<p>You can cheak the status of your build request at anytime by visiting this page<p>
+<p>Template is added to the queue to be built<p>
+<p>We can email you when the Kiosk has been built.<p>
+<form enctype="multipart/form-data" method="post" action=".">
+{{ form.as_p }}
+<p><input type="submit" value="Notify →"></p>
+</form>
Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/index.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-10 00:25:57 UTC (rev 2592)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-10 22:43:18 UTC (rev 2593)
@@ -2,6 +2,5 @@
<form enctype="multipart/form-data" method="post" action=".">
{{ form.as_p }}
-
<p><input type="submit" value="Continue →"></p>
</form>
Added: trunk/morphixlivekiosk/scripts/mbuild/templates/java-terms-accept.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/java-terms-accept.html (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/java-terms-accept.html 2007-11-10 22:43:18 UTC (rev 2593)
@@ -0,0 +1,219 @@
+<h1>Custom Built Kiosk LiveCD</h1>
+<h2>Java Terms and conditons</h2>
+Below is a note <a href=http://download.java.net/dlj/DLJ-FAQ.html#q17>extracted from Java.net</a>:-
+<blockquote>
+17. What do you mean by "Present for acceptance end user licenses" (from #8 above)? Do I have to create a click-through license display when a user first installs or runs the JDK? Must my users accept the license?
+
+Your users must agree to the license terms for the JDK before installing it. While you aren't required to show the DLJ on first use or installation, you must inform them that the JDK is licensed software and that they must agree to the license before using it. A click-through mechanism is the preferred way to do this, but at a minimum you must present the license by some appropriate means for acceptance. For example, your OS download procedure could show the user a page that informs him or her that software packages included in the download may contain software licenses to which the user must agree before installation, and allow the user to review them before download.
+
+You can leverage your distribution's packaging technology to ensure that the license terms have been accepted. For instance, on Debian and derivative distributions, you could configure the package so that if the debconf key for accepting the DLJ has not been pre-accepted, the installation will be canceled if the license cannot be presented. The point of presenting the license is that an individual, corporation, non-profit or entity which will be an end user of the JRE or JDK has had a chance to review and agree to the DLJ. If the user or administrator pre-accepts the key for DLJ agreement on behalf of herself or her group then it is perfectly acceptable to silently install Sun Java on one or many computers. This is an excellent example of how you can leverage packaging infrastructure to comply with the terms of the DLJ in ways that are convenient and expected for your users.
+</blockquote>
+
+<p>Please read the following terms downloaded from <a href=http://download.java.net/dlj/DLJ-v1.1.txt>http://download.java.net/dlj/DLJ-v1.1.txt</a>:-<p>
+<blockquote>
+ Operating System Distributor License for Java version 1.1
+
+SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE JAVA PLATFORM
+STANDARD EDITION DEVELOPER KIT ("JDK" - THE "SOFTWARE") TO YOU ONLY
+UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS
+LICENSE AGREEMENT (THE "AGREEMENT"). PLEASE READ THE AGREEMENT
+CAREFULLY. BY INSTALLING, USING, OR DISTRIBUTING THIS SOFTWARE, YOU
+ACCEPT ALL OF THE TERMS OF THE AGREEMENT.
+
+1. DEFINITIONS. "Software" means the code identified above in binary
+ form, any other machine readable materials including, but not
+ limited to, libraries, source files, header files, and data files),
+ any updates or error corrections provided by Sun, and any user
+ manuals, programming guides and other documentation provided to you
+ by Sun under this Agreement, and any subsequent versions that Sun
+ makes available to you hereunder. "Operating System" means any
+ version of the Linux or OpenSolaris operating systems that manages
+ the hardware resources of a general purpose desktop or server
+ computer and shares these resources with various software programs
+ that run on top of it. "Programs" means Java technology applets and
+ applications intended to run on the Java Platform Standard Edition
+ (Java SE platform) platform on Java-enabled general purpose desktop
+ computers and servers.
+
+2. License Grant. Subject to the terms and conditions of this
+ Agreement, as well as the restrictions and exceptions set forth in
+ the Software README file, Sun grants you a non-exclusive,
+ non-transferable, royalty-free limited license to reproduce and use
+ the Software internally, complete and unmodified, for the sole
+ purposes of running Programs and designing, developing and testing
+ Programs. Sun also grants you a non-exclusive, non-transferable,
+ royalty-free limited license to reproduce and distribute the
+ Software, directly or indirectly through your licensees,
+ distributors, resellers, or OEMs, electronically or in physical
+ form or pre-installed with your Operating System on a general
+ purpose desktop computer or server, provided that: (a) the Software
+ and any proprietary legends or notices are complete and unmodified;
+ (b) the Software is distributed with your Operating System, and
+ such distribution is solely for the purposes of running Programs
+ under the control of your Operating System and designing,
+ developing and testing Programs to be run under the control of your
+ Operating System; (c) you do not combine, configure or distribute
+ the Software to run in conjunction with any additional software
+ that implements the same or similar functionality or APIs as the
+ Software; (d) you do not remove or modify any included license
+ agreement or impede or prevent it from displaying and requiring
+ acceptance; (e) you only distribute the Software subject to this
+ license agreement; and (f) you agree to defend and indemnify Sun
+ and its licensors from and against any damages, costs, liabilities,
+ settlement amounts and/or expenses (including attorneys' fees)
+ incurred in connection with any claim, lawsuit or action by any
+ third party that arises or results from (i) the use or distribution
+ of your Operating System, or any part thereof, in any manner, or
+ (ii) your use or distribution of the Software in violation of the
+ terms of this Agreement or applicable law. You shall not be
+ obligated under Section 2(f)(i) if such claim would not have
+ occurred but for a modification made to your Operating System by
+ someone not under your direction or control, and you were in
+ compliance with all other terms of this Agreement. If the Software
+ README file permits certain files to be replaced or omitted from
+ your distribution, then any such replacement(s) or omission(s)
+ shall not be considered a breach of Section 2(a).
+
+3. RESTRICTIONS. Software is copyrighted and title to Software and
+ all associated intellectual property rights is retained by Sun
+ and/or its licensors. Unless enforcement is prohibited by
+ applicable law, you may not modify, decompile, or reverse engineer
+ Software. You may not create, modify, or change the behavior of,
+ or authorize your licensees, distributors, resellers, OEMs, or end
+ users (collectively, "Licensees") to create, modify, or change the
+ behavior of, classes, interfaces, or subpackages that are in any
+ way identified as "java", "javax", "sun" or similar convention as
+ specified by Sun in any naming convention designation. You
+ acknowledge that Licensed Software is not designed or intended for
+ use in the design, construction, operation or maintenance of any
+ nuclear facility. Sun Microsystems, Inc. disclaims any express or
+ implied warranty of fitness for such uses.
+
+4. COMPATIBILITY. If you exercise the license in Section 2, and Sun
+ or a licensee of the Software (under section 4(b)) notifies you
+ that there are compatibility issues (as determined by the
+ applicable Technology Compatibility Kit) caused by the interaction
+ of the Software with your Operating System, then within ninety
+ (90) days you must either: (a) modify the Operating System in a
+ way that resolves the compatibility issue (as determined by Sun)
+ and make a patch or replacement version available to your
+ Licensees who have already received the version of your Operating
+ System that was the subject of the compatibility issue ("Your
+ Incompatible Operating System"); or (b) cease distributing the
+ Software and make commercially reasonable attempts to forward the
+ notification to your Licensees who have already received Your
+ Incompatible Operating System.
+
+5. Trademarks and Logos. No right, title or interest in or to any
+ trademark, service mark, logo or trade name of Sun or its
+ licensors is granted under this Agreement. You acknowledge and
+ agree that, as between you and Sun, Sun owns the SUN and JAVA
+ trademarks and all SUN and JAVA-related trademarks, service marks,
+ logos and other brand designations ("Sun Marks"), and you agree to
+ comply with the Sun Trademark and Logo Usage Requirements
+ currently located at http://www.sun.com/policies/trademarks. Any
+ use you make of the Sun Marks inures to Sun's benefit.
+
+6. LIMITED WARRANTY. If you received the Software directly from Sun
+ or its authorized resellers, Sun warrants to you that for a period
+ of ninety (90) days from delivery to you, the media on which
+ Software is furnished (if any) will be free of defects in
+ materials and workmanship under normal use. Except for the
+ foregoing, Software is provided "AS IS". Your exclusive remedy
+ and Sun's entire liability under this limited warranty will be
+ replacement of the Software media. This limited warranty gives
+ you specific legal rights. You may have others, which vary from
+ state to state.
+
+7. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS AGREEMENT, ALL
+ EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO
+ THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
+
+8. LIMITATION OF LIABILITY. IN NO EVENT WILL SUN OR ITS LICENSORS BE
+ LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR
+ PUNITIVE DAMAGES IN CONNECTION WITH OR ARISING OUT OF THIS
+ AGREEMENT (INCLUDING LOSS OF PROFITS, USE, DATA, OR OTHER ECONOMIC
+ ADVANTAGE), NO MATTER WHAT THEORY OF LIABILITY, EVEN IF SUN HAS
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will
+ Sun's liability to you, whether in contract, tort (including
+ negligence), or otherwise, exceed the amount paid by you for the
+ Software under this Agreement. The foregoing limitations will
+ apply even if the above stated warranty fails of its essential
+ purpose. Some states do not allow the exclusion of incidental or
+ consequential damages, so some of the terms above may not be
+ applicable to you.
+
+9. THIRD PARTY CODE. Additional copyright notices and license terms
+ applicable to portions of the Software are set forth in the
+ THIRDPARTYLICENSEREADME.txt file. In addition to any terms and
+ conditions of any third party opensource/freeware license
+ identified in the THIRDPARTYLICENSEREADME.txt file, the disclaimer
+ of warranty and limitation of liability provisions in paragraphs 7
+ and 8 of this Agreement shall apply to all Software in this
+ distribution.
+
+10. Termination. This Agreement is effective until it is
+ terminated. You may terminate this Agreement at any time by
+ ceasing distribution of the Software. This Agreement will
+ terminate immediately without notice from Sun if you fail to
+ comply with any material provision herein. Either party may
+ terminate this Agreement immediately should any Software become,
+ or in either party's opinion be likely to become, the subject of a
+ claim of infringement of any intellectual property right. Upon
+ termination, you must destroy all copies and cease copying and
+ distribution of the Software. All of your obligations and any
+ applicable limitations on your rights and remedies under this
+ Agreement shall survive termination.
+
+11. SOURCE CODE. Software may contain source code that, unless
+ expressly licensed for other purposes, is provided solely for
+ reference purposes pursuant to the terms of this Agreement.
+ Source code may not be redistributed unless expressly provided for
+ in this Agreement.
+
+12. Export Regulations. All Software and technical data delivered
+ under this Agreement are subject to US export control laws and may
+ be subject to export or import regulations in other countries.
+ You acknowledge that you have the responsibility to obtain such
+ licenses to export, re-export, or import as may be required after
+ delivery to you.
+
+13. U.S. GOVERNMENT RESTRICTED RIGHTS. If Software is being acquired
+ by or on behalf of the U.S. Government or by a U.S. Government
+ prime contractor or subcontractor (at any tier), then the
+ Government's rights in Software and accompanying documentation
+ will be only as set forth in this Agreement; this is in accordance
+ with 48 CFR 227.7201 through 227.7202-4 (for Department of Defense
+ (DOD) acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD
+ acquisitions).
+
+14. MISCELLANEOUS. Any action related to this Agreement will be
+ governed by California law and controlling U.S. federal law. No
+ choice of law rules of any jurisdiction will apply. If any
+ provision of this Agreement is held to be unenforceable, this
+ Agreement will remain in effect upon the parties' agreement to
+ revised terms that most nearly accomplish the same effect. This
+ Agreement is the entire agreement between you and Sun relating to
+ its subject matter. It supersedes all prior or contemporaneous
+ oral or written communications, proposals, representations and
+ warranties and prevails over any conflicting or additional terms
+ of any quote, order, acknowledgment, or other communication
+ between the parties relating to its subject matter during the term
+ of this Agreement. No modification of this Agreement will be
+ binding, unless in writing and signed by an authorized
+ representative of each party.
+
+For inquiries please contact: Sun Microsystems, Inc., 4150 Network Circle,
+Santa Clara, California 95054, U.S.A.
+
+DLJ v1.1 27APR2006ANS
+
+</blockquote>
+
+<p>We can email you when the Kiosk has been built.<p>
+<form enctype="multipart/form-data" method="post" action=".">
+{{ form.as_p }}
+ <p><input type="submit" value="Notify →"></p>
+</form>
Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/master.xml
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/master.xml 2007-11-10 00:25:57 UTC (rev 2592)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/master.xml 2007-11-10 22:43:18 UTC (rev 2593)
@@ -5,17 +5,11 @@
<brand>{{newtemplate.brand}}</brand>
<graphic>http://mbuild.livecd.org/images/{{newtemplate.graphic}}</graphic>
<homepage>{{newtemplate.homepage}}</homepage>
-{% if newtemplate.navbar %} <navbar>true</navbar>
-{% else %} <navbar>true</navbar>
-{% endif %}
- <extralist>
-{% if newtemplate.flash %} <MiniModule>MorphixMini-NonFree-FlashPlugin.xml</MiniModule> {% endif %}
-{% if newtemplate.java %} <MiniModule>MorphixMini-NonFree-Java.xml</MiniModule> {% endif %}
+{% if newtemplate.navbar %} <navbar>true</navbar> {% else %} <navbar>false</navbar> {% endif %}
+ <extralist>{% if newtemplate.flash %} <MiniModule>MorphixMini-NonFree-FlashPlugin.xml</MiniModule> {% endif %}{% if newtemplate.java %} <MiniModule>MorphixMini-NonFree-Java.xml</MiniModule> {% endif %}
</extralist>
<network>
-{% if newtemplate.built %} <dhcp>dhcp</dhcp>
-{% else %} <dhcp></dhcp>
-{% endif %}
+{% if newtemplate.dhcp %} <dhcp>dhcp</dhcp>{% else %} <dhcp></dhcp>{% endif %}
</network>
</kiosk>
</group>
Added: trunk/morphixlivekiosk/scripts/mbuild/templates/status.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/status.html (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/status.html 2007-11-10 22:43:18 UTC (rev 2593)
@@ -0,0 +1,15 @@
+<h1>Custom Built Kiosk LiveCD</h1>
+<h2>Status</h2>
+{% if newtemplate.built %}
+ <p>Email has been sent, build is complete. It is listed in the <a href=/view-queue/>hall of fame</a> of built and yet to be build kiosks<p>
+ <p>The LiveCD has been tested - there is a <a href=http://{{newtemplate.builtdomain}}/{{newtemplate.builtogg}}>video of the {{newtemplate.brand}} LiveCD booting</a>. Having a look at the video could save time downloading an iso that will not boot</a>. Below are frames captured from the video.</p>
+ <img src=http://{{newtemplate.builtdomain}}/{{newtemplate.builtjpg}}>
+ <p>The <a href=http://{{newtemplate.builtdomain}}/{{newtemplate.builtiso}}>{{newtemplate.brand}} Kiosk</a> is available for download.</p>
+{% else %}
+ <p>You build request is XXX in the list<p>
+ <p>Will send an email when the elves have built the kiosk.<p>
+ <p>In the meatime - have a look at the <a href=/view-queue/>queue of built and yet to be build kiosks</a><p>
+{% endif %}
+<p><a href=/templates/{{newtemplate.template}}>Raw Template.xml</a><p>
+<p><a href=/xml/morphix/{{newtemplate.template}}/>Morphix Style template.xml</a><p>
+<p>You can cheak the status of your build request at anytime by visiting this page<p>
Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/template.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/template.html 2007-11-10 00:25:57 UTC (rev 2592)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/template.html 2007-11-10 22:43:18 UTC (rev 2593)
@@ -4,6 +4,5 @@
<p>We can email you when the Kiosk has been built.<p>
<form enctype="multipart/form-data" method="post" action=".">
{{ form.as_p }}
-
<p><input type="submit" value="Notify →"></p>
</form>
Modified: trunk/morphixlivekiosk/scripts/mbuild/urls.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-10 00:25:57 UTC (rev 2592)
+++ trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-10 22:43:18 UTC (rev 2593)
@@ -2,11 +2,13 @@
urlpatterns = patterns('',
(r'^$', 'mbuild.web.views.index'),
+ (r'^mbuild/terms/(?P<template>[^/]+)/', 'mbuild.web.views.acceptterms'),
(r'^mbuild/status/(?P<template>[^/]+)/', 'mbuild.web.views.mbuildstatus'),
(r'^xml/morphix/(?P<template>[^/]+)/', 'mbuild.web.views.converttokabtxml'),
(r'^mbuild/(?P<template>[^/]+)/', 'mbuild.web.views.mbuild'),
(r'^view-queue/', 'mbuild.web.views.viewqueue'),
(r'^kabt-queue/', 'mbuild.web.views.kabtqueue'),
+ (r'^kabt-built/', 'mbuild.web.views.sucessfulbuild'),
(r'^delete-queue/', 'mbuild.web.views.delall'),
# Uncomment this for admin:
Modified: trunk/morphixlivekiosk/scripts/mbuild/web/models.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-10 00:25:57 UTC (rev 2592)
+++ trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-10 22:43:18 UTC (rev 2593)
@@ -13,7 +13,9 @@
flash = models.BooleanField(default=False)
java = models.BooleanField(default=False)
graphic = models.CharField(maxlength="150")
+ dhcp = models.BooleanField(default=False)
builtdomain = models.CharField(maxlength="150")
builtiso = models.CharField(maxlength="150")
builtogg = models.CharField(maxlength="150")
- builtjpg = models.CharField(maxlength="150")
\ No newline at end of file
+ builtjpg = models.CharField(maxlength="150")
+ oktobuild = models.BooleanField(default=False)
\ No newline at end of file
Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-10 00:25:57 UTC (rev 2592)
+++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-10 22:43:18 UTC (rev 2593)
@@ -11,7 +11,7 @@
def index(request):
class BuildForm(forms.Form):
- brand_name = forms.CharField(max_length=150, required=True, label="What Brand name would you like to use?", initial="Morphix LiveKiosk")
+ brand_name = forms.CharField(max_length=150, required=True, label="What Brand name would you like to use? (No spaces or dashes e.g. MorphixLiveKiosk)", initial="MorphixLiveKiosk")
graphics = forms.ImageField(required=False, label="Graphics file (1024x768, 32pps, any format works best)")
homepage = forms.CharField(max_length=150, required=True, label="Desired homepage http://", initial="www.morphix.org")
nav_bar = forms.BooleanField(widget=forms.RadioSelect(choices=[("1", 'Yes'), ("0", 'No')]),
@@ -32,10 +32,10 @@
#save the image file
if cd.get('graphics'):
- f = file('/var/www/images/%s' % cd['graphics'].filename, 'wb')
+ f = file('/var/www/images/%s' % uniq + "-" + cd['graphics'].filename, 'wb')
f.write(cd['graphics'].content)
f.close()
- cd['graphics'] = cd['graphics'].filename
+ cd['graphics'] = "%s" % uniq + "-" + cd['graphics'].filename
root = ET.Element("LIVECD")
for v in cd:
@@ -49,14 +49,38 @@
template_name = "%s.xml" % uniq
template = Queue(template=template_name, brand=cd['brand_name'], homepage=cd['homepage'], navbar=cd['nav_bar'], flash=cd['flash'], java=cd['java'], graphic=cd['graphics'])
template.save()
- return HttpResponseRedirect("/mbuild/%s/" % template_name )
+ if template.java:
+ return HttpResponseRedirect("/mbuild/terms/%s/" % template_name )
+ else:
+ return HttpResponseRedirect('/mbuild/%s/' % template_name )
else:
form = BuildForm()
-
context = {'form': form}
return render_to_response('index.html', context,
context_instance=RequestContext(request))
+
+def acceptterms(request, template):
+ class BuildForm(forms.Form):
+ accept = forms.BooleanField(widget=forms.RadioSelect(choices=[("1", 'Yes'), ("0", 'No')]), label="Accept terms and conditions?", initial="0")
+ if request.POST:
+ try:
+ newtemplate = Queue.objects.get(pk=template)
+ newtemplate.oktobuild = request.POST["accept"]
+ newtemplate.save()
+ if newtemplate.oktobuild == "1":
+ return HttpResponseRedirect('/mbuild/%s/' % template)
+ else:
+ return HttpResponse("Elves will not build unless the terms and conditions are accepted")
+ except Queue.DoesNotExist:
+ return HttpResponse("Template does not exist")
+ else:
+ form = BuildForm()
+ context = {'form': form}
+ return render_to_response('java-terms-accept.html', context,
+ context_instance=RequestContext(request))
+
+
def mbuild(request, template):
class BuildForm(forms.Form):
emailnotify = forms.EmailField("Email to recieve notifications?")
@@ -71,14 +95,14 @@
return HttpResponseRedirect("/mbuild/status/%s/" % template )
else:
form = BuildForm()
- context = {'form': form}
- return render_to_response('index.html', context,
+ context = {'form': form}
+ return render_to_response('template.html', context,
context_instance=RequestContext(request))
def mbuildstatus(request, template):
try:
newtemplate = Queue.objects.get(pk=template)
- return render_to_response("emailnotify.html",{"newtemplate":newtemplate})
+ return render_to_response("status.html",{"newtemplate":newtemplate})
except Queue.DoesNotExist:
return HttpResponse("Template does not exist")
@@ -90,13 +114,28 @@
return HttpResponse("Template does not exist")
def kabtqueue(request):
- queue_list = Queue.objects.filter(built=False).order_by('template')
+ queue_list = Queue.objects.filter(built=False, oktobuild=True).order_by('template')
return render_to_response('kabt-queue.html', {'queue_list': queue_list})
def viewqueue(request):
queue_list = Queue.objects.all().order_by('template')
return render_to_response('view-queue.html', {'queue_list': queue_list})
+def sucessfulbuild(request):
+# class BuildForm(forms.Form):
+# maindomain = forms.CharField(max_length=150)
+ if request.GET:
+ queue_list = Queue.objects.filter(built=False).order_by('template')[0]
+ queue_list.built = True
+ queue_list.builtdomain = request.GET["built"]
+ queue_list.builtiso = request.GET["i"]
+ queue_list.builtogg = request.GET["v"]
+ queue_list.builtjpg = request.GET["v"] + ".jpg"
+ queue_list.save()
+ return render_to_response('delete-queue.html', {'queue_list': queue_list})
+ else:
+ return HttpResponse("Could not determine the successful builds - see kabt.sh documentation")
+
def delall(request):
# Will disable when running live
Queue.objects.all().delete()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|