From: <gan...@us...> - 2007-11-02 22:28:46
|
Revision: 2583 http://morphix.svn.sourceforge.net/morphix/?rev=2583&view=rev Author: gandalfar Date: 2007-11-02 15:28:44 -0700 (Fri, 02 Nov 2007) Log Message: ----------- README and some more code Modified Paths: -------------- trunk/morphixlivekiosk/scripts/mbuild/templates/index.html trunk/morphixlivekiosk/scripts/mbuild/web/views.py Added Paths: ----------- trunk/morphixlivekiosk/scripts/mbuild/README Added: trunk/morphixlivekiosk/scripts/mbuild/README =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/README (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/README 2007-11-02 22:28:44 UTC (rev 2583) @@ -0,0 +1,3 @@ +You need python2.4+ and Django trunk to run this. + +Run `python manage.py syncdb` to generate the .db file \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/index.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-02 22:14:44 UTC (rev 2582) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-02 22:28:44 UTC (rev 2583) @@ -1,3 +1,5 @@ +<h1>Custom Built Kiosk LiveCD</h1> + <form action="." method="post" accept-charset="utf-8"> {{ form.as_p }} Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-02 22:14:44 UTC (rev 2582) +++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-02 22:28:44 UTC (rev 2583) @@ -2,25 +2,31 @@ from django.template import RequestContext from django import newforms as forms +import datetime, time +import elementtree.ElementTree as ET + + def index(request): class BuildForm(forms.Form): brand_name = forms.CharField(max_length=150, required=True) graphics = forms.ImageField(required=False) homepage = forms.CharField(max_length=150, required=True) nav_bar = forms.BooleanField(widget=forms.RadioSelect(choices=[(True, 'Yes'), (False, 'No')]), - initial=True) + initial=True, label="Should the Navigation Bar be visable?") dhcp = forms.BooleanField(widget=forms.RadioSelect(choices=[(True, 'Yes'), (False, 'No')]), - initial=True) + initial=True, label="Use DHCP?") flash = forms.BooleanField(widget=forms.RadioSelect(choices=[(True, 'Yes'), (False, 'No')]), label="Include Flash?", initial=False) java = forms.BooleanField(widget=forms.RadioSelect(choices=[(True, 'Yes'), (False, 'No')]), label="Include Java?", initial=False) - if request.POST: form = BuildForm(request.POST.copy()) if form.is_valid(): - pass + dt = datetime.datetime.now() + uniq = time.mktime(dt.timetuple()) + dt.microsecond/1e6 + + print uniq else: form = BuildForm() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gan...@us...> - 2007-11-02 22:59:53
|
Revision: 2585 http://morphix.svn.sourceforge.net/morphix/?rev=2585&view=rev Author: gandalfar Date: 2007-11-02 15:59:50 -0700 (Fri, 02 Nov 2007) Log Message: ----------- added the images part Modified Paths: -------------- trunk/morphixlivekiosk/scripts/mbuild/templates/index.html trunk/morphixlivekiosk/scripts/mbuild/web/views.py Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/index.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-02 22:38:32 UTC (rev 2584) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-02 22:59:50 UTC (rev 2585) @@ -1,6 +1,6 @@ <h1>Custom Built Kiosk LiveCD</h1> -<form action="." method="post" accept-charset="utf-8"> +<form enctype="multipart/form-data" method="post" action="."> {{ form.as_p }} <p><input type="submit" value="Continue →"></p> Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-02 22:38:32 UTC (rev 2584) +++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-02 22:59:50 UTC (rev 2585) @@ -9,9 +9,9 @@ def index(request): class BuildForm(forms.Form): - brand_name = forms.CharField(max_length=150, required=True) - graphics = forms.ImageField(required=False) - homepage = forms.CharField(max_length=150, required=True) + brand_name = forms.CharField(max_length=150, required=True, label="What Brand would you like to use?") + 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") nav_bar = forms.BooleanField(widget=forms.RadioSelect(choices=[(True, 'Yes'), (False, 'No')]), initial=True, label="Should the Navigation Bar be visable?") dhcp = forms.BooleanField(widget=forms.RadioSelect(choices=[(True, 'Yes'), (False, 'No')]), @@ -22,12 +22,19 @@ label="Include Java?", initial=False) if request.POST: - form = BuildForm(request.POST.copy()) + form = BuildForm(request.POST, request.FILES) if form.is_valid(): dt = datetime.datetime.now() uniq = time.mktime(dt.timetuple()) + dt.microsecond/1e6 cd = form.cleaned_data + #save the image file + if cd.get('graphics'): + f = file('incoming/%s' % cd['graphics'].filename, 'wb') + f.write(cd['graphics'].content) + f.close() + cd['graphics'] = cd['graphics'].filename + root = ET.Element("LIVECD") for v in cd: sub = ET.SubElement(root, v) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bms...@us...> - 2007-11-07 23:19:30
|
Revision: 2587 http://morphix.svn.sourceforge.net/morphix/?rev=2587&view=rev Author: bmsleight Date: 2007-11-07 15:19:24 -0800 (Wed, 07 Nov 2007) Log Message: ----------- I am starting to like django Modified Paths: -------------- 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/emailnotify.html trunk/morphixlivekiosk/scripts/mbuild/templates/template.html Added: trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html 2007-11-07 23:19:24 UTC (rev 2587) @@ -0,0 +1,3 @@ +<h1>Custom Built Kiosk LiveCD</h1> + +<p>Will email {{ emailnotify }} when the elves have built the kiosk.<p> \ No newline at end of file Added: trunk/morphixlivekiosk/scripts/mbuild/templates/template.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/template.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/template.html 2007-11-07 23:19:24 UTC (rev 2587) @@ -0,0 +1,9 @@ +<h1>Custom Built Kiosk LiveCD</h1> +<p>Template {{ 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/urls.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-04 15:42:24 UTC (rev 2586) +++ trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-07 23:19:24 UTC (rev 2587) @@ -2,6 +2,7 @@ urlpatterns = patterns('', (r'^$', 'mbuild.web.views.index'), + (r'^template/(?P<template>[^/]+)/', 'mbuild.web.views.template'), # Uncomment this for admin: # (r'^admin/', include('django.contrib.admin.urls')), Modified: trunk/morphixlivekiosk/scripts/mbuild/web/models.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-04 15:42:24 UTC (rev 2586) +++ trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-07 23:19:24 UTC (rev 2587) @@ -1,3 +1,10 @@ from django.db import models # Create your models here. + +class Queue(models.Model): + template = models.CharField(maxlength="20", primary_key=True) + brand = models.CharField(maxlength="20") + built = models.BooleanField(default=False, + help_text="Has Kiosk been built") + notifybyemail = models.EmailField(null=True) Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-04 15:42:24 UTC (rev 2586) +++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-07 23:19:24 UTC (rev 2587) @@ -2,6 +2,8 @@ from django.template import RequestContext from django import newforms as forms from django.http import HttpResponse +from django.http import HttpResponseRedirect +from mbuild.web.models import Queue import datetime, time import elementtree.ElementTree as ET @@ -9,9 +11,9 @@ def index(request): class BuildForm(forms.Form): - brand_name = forms.CharField(max_length=150, required=True, label="What Brand would you like to use?") + brand_name = forms.CharField(max_length=150, required=True, label="What Brand name would you like to use?") 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") + homepage = forms.CharField(max_length=150, required=True, label="Desired homepage http://") nav_bar = forms.BooleanField(widget=forms.RadioSelect(choices=[(True, 'Yes'), (False, 'No')]), initial=True, label="Should the Navigation Bar be visable?") dhcp = forms.BooleanField(widget=forms.RadioSelect(choices=[(True, 'Yes'), (False, 'No')]), @@ -42,10 +44,23 @@ tree = ET.ElementTree(root) tree.write("incoming/%s.xml" % uniq) - return HttpResponse("The Elves have started preparing your LiveCD.") + return HttpResponseRedirect("/template/%s.xml/" % uniq ) else: form = BuildForm() context = {'form': form} return render_to_response('index.html', context, - context_instance=RequestContext(request)) \ No newline at end of file + context_instance=RequestContext(request)) + +def template(request, template): + class BuildForm(forms.Form): + emailnotify = forms.EmailField("Email to recieve notifications?") + if request.POST: + emailnotify = request.POST["emailnotify"] + return render_to_response("emailnotify.html",{"emailnotify":emailnotify}) + else: + form = BuildForm() + context = {'form': form} + return render_to_response('index.html', context, + context_instance=RequestContext(request)) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bms...@us...> - 2007-11-08 22:43:32
|
Revision: 2589 http://morphix.svn.sourceforge.net/morphix/?rev=2589&view=rev Author: bmsleight Date: 2007-11-08 14:43:23 -0800 (Thu, 08 Nov 2007) Log Message: ----------- I really really _really_ like django Modified Paths: -------------- trunk/morphixlivekiosk/scripts/mbuild/settings.py trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html 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/view-queue.html Modified: trunk/morphixlivekiosk/scripts/mbuild/settings.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/settings.py 2007-11-07 23:26:27 UTC (rev 2588) +++ trunk/morphixlivekiosk/scripts/mbuild/settings.py 2007-11-08 22:43:23 UTC (rev 2589) @@ -81,4 +81,5 @@ 'django.contrib.sessions', 'django.contrib.sites', 'mbuild.web', + 'django.contrib.admin', ) Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html 2007-11-07 23:26:27 UTC (rev 2588) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html 2007-11-08 22:43:23 UTC (rev 2589) @@ -1,3 +1,5 @@ <h1>Custom Built Kiosk LiveCD</h1> -<p>Will email {{ emailnotify }} when the elves have built the kiosk.<p> \ No newline at end of file +<p>Will email {{ emailnotify }} 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> \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/template.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/template.html 2007-11-07 23:26:27 UTC (rev 2588) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/template.html 2007-11-08 22:43:23 UTC (rev 2589) @@ -1,5 +1,5 @@ <h1>Custom Built Kiosk LiveCD</h1> -<p>Template {{ template }} is added to the queue to be built<p> +<p>Template {{ template_name }} 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="."> Added: trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html 2007-11-08 22:43:23 UTC (rev 2589) @@ -0,0 +1,11 @@ +<h1>Custom Built Kiosk LiveCD</h1> + +{% if queue_list %} + <ul> + {% for queue in queue_list %} + <li>{{ queue.template }} <a href=http://{{ queue.homepage }}>{{ queue.brand }}</a> - Has been built ? {{ queue.built }} </li> + {% endfor %} + </ul> +{% else %} + <p>No template in current queue.</p> +{% endif %} \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/urls.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-07 23:26:27 UTC (rev 2588) +++ trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-08 22:43:23 UTC (rev 2589) @@ -3,8 +3,10 @@ urlpatterns = patterns('', (r'^$', 'mbuild.web.views.index'), (r'^template/(?P<template>[^/]+)/', 'mbuild.web.views.template'), + (r'^view-queue/', 'mbuild.web.views.viewqueue'), + (r'^delete-queue/', 'mbuild.web.views.delall'), # Uncomment this for admin: -# (r'^admin/', include('django.contrib.admin.urls')), + (r'^admin/', include('django.contrib.admin.urls')), ) Modified: trunk/morphixlivekiosk/scripts/mbuild/web/models.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-07 23:26:27 UTC (rev 2588) +++ trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-08 22:43:23 UTC (rev 2589) @@ -4,7 +4,8 @@ class Queue(models.Model): template = models.CharField(maxlength="20", primary_key=True) - brand = models.CharField(maxlength="20") + brand = models.CharField(maxlength="150") built = models.BooleanField(default=False, help_text="Has Kiosk been built") notifybyemail = models.EmailField(null=True) + homepage = models.CharField(maxlength="150") \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-07 23:26:27 UTC (rev 2588) +++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-08 22:43:23 UTC (rev 2589) @@ -44,7 +44,12 @@ tree = ET.ElementTree(root) tree.write("/var/www/templates/%s.xml" % uniq) - return HttpResponseRedirect("/template/%s.xml/" % uniq ) + + #Save details to dBase + template_name = "%s.xml" % uniq + template = Queue(template=template_name, brand=cd['brand_name'], homepage=cd['homepage']) + template.save() + return HttpResponseRedirect("/template/%s/" % template_name ) else: form = BuildForm() @@ -57,6 +62,12 @@ emailnotify = forms.EmailField("Email to recieve notifications?") if request.POST: emailnotify = request.POST["emailnotify"] + try: + newtemplate = Queue.objects.get(pk=template) + newtemplate.notifybyemail = emailnotify + newtemplate.save() + except Queue.DoesNotExist: + return HttpResponse("Template does not exist") return render_to_response("emailnotify.html",{"emailnotify":emailnotify}) else: form = BuildForm() @@ -64,3 +75,11 @@ return render_to_response('index.html', context, context_instance=RequestContext(request)) +def viewqueue(request): + queue_list = Queue.objects.all().order_by('template') + return render_to_response('view-queue.html', {'queue_list': queue_list}) + +def delall(request): + # Will disable when running live + Queue.objects.all().delete() + return HttpResponse("The Elves have deleted the whole queue.") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bms...@us...> - 2007-11-09 23:34:30
|
Revision: 2590 http://morphix.svn.sourceforge.net/morphix/?rev=2590&view=rev Author: bmsleight Date: 2007-11-09 15:34:22 -0800 (Fri, 09 Nov 2007) Log Message: ----------- More django Modified Paths: -------------- trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.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/kabt-queue.html trunk/morphixlivekiosk/scripts/mbuild/templates/master.xml Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html 2007-11-08 22:43:23 UTC (rev 2589) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/emailnotify.html 2007-11-09 23:34:22 UTC (rev 2590) @@ -1,5 +1,12 @@ <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>Will email {{ emailnotify }} 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> \ No newline at end of file +<p><a href=/template/{{newtemplate.template}}>Raw Template.xml</a><p> +<p>You can cheak the status of your build request at anytime by visiting this page<p> Added: trunk/morphixlivekiosk/scripts/mbuild/templates/kabt-queue.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/kabt-queue.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/kabt-queue.html 2007-11-09 23:34:22 UTC (rev 2590) @@ -0,0 +1,2 @@ +{% if queue_list %}{% for queue in queue_list %}http://mbuild.livecd.org/mbuild/morphix.xml/{{ queue.template }}/ +{% endfor %}{% endif %} \ No newline at end of file Added: trunk/morphixlivekiosk/scripts/mbuild/templates/master.xml =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/master.xml (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/master.xml 2007-11-09 23:34:22 UTC (rev 2590) @@ -0,0 +1,22 @@ +<comps> + <group> + <kiosk> + <version>0.0.1</version> + <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 %} + </extralist> + <network> +{% if newtemplate.built %} <dhcp>dhcp</dhcp> +{% else %} <dhcp></dhcp> +{% endif %} + </network> + </kiosk> + </group> +</comps> Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html 2007-11-08 22:43:23 UTC (rev 2589) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html 2007-11-09 23:34:22 UTC (rev 2590) @@ -3,7 +3,7 @@ {% if queue_list %} <ul> {% for queue in queue_list %} - <li>{{ queue.template }} <a href=http://{{ queue.homepage }}>{{ queue.brand }}</a> - Has been built ? {{ queue.built }} </li> + <li><a href=/mbuild/status/{{ queue.template }}/>{{ queue.template }}</a> <a href=http://{{ queue.homepage }}>{{ queue.brand }}</a> - Has been built ? {{ queue.built }} </li> {% endfor %} </ul> {% else %} Modified: trunk/morphixlivekiosk/scripts/mbuild/urls.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-08 22:43:23 UTC (rev 2589) +++ trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-09 23:34:22 UTC (rev 2590) @@ -2,8 +2,11 @@ urlpatterns = patterns('', (r'^$', 'mbuild.web.views.index'), - (r'^template/(?P<template>[^/]+)/', 'mbuild.web.views.template'), + (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'^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-08 22:43:23 UTC (rev 2589) +++ trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-09 23:34:22 UTC (rev 2590) @@ -8,4 +8,12 @@ built = models.BooleanField(default=False, help_text="Has Kiosk been built") notifybyemail = models.EmailField(null=True) - homepage = models.CharField(maxlength="150") \ No newline at end of file + homepage = models.CharField(maxlength="150") + navbar = models.BooleanField(default=False) + flash = models.BooleanField(default=False) + java = models.BooleanField(default=False) + graphic = models.CharField(maxlength="150") + 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 Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-08 22:43:23 UTC (rev 2589) +++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-09 23:34:22 UTC (rev 2590) @@ -47,9 +47,9 @@ #Save details to dBase template_name = "%s.xml" % uniq - template = Queue(template=template_name, brand=cd['brand_name'], homepage=cd['homepage']) + 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("/template/%s/" % template_name ) + return HttpResponseRedirect("/mbuild/%s/" % template_name ) else: form = BuildForm() @@ -57,7 +57,7 @@ return render_to_response('index.html', context, context_instance=RequestContext(request)) -def template(request, template): +def mbuild(request, template): class BuildForm(forms.Form): emailnotify = forms.EmailField("Email to recieve notifications?") if request.POST: @@ -68,13 +68,31 @@ newtemplate.save() except Queue.DoesNotExist: return HttpResponse("Template does not exist") - return render_to_response("emailnotify.html",{"emailnotify":emailnotify}) + return HttpResponseRedirect("/mbuild/status/%s/" % template ) else: form = BuildForm() context = {'form': form} return render_to_response('index.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}) + except Queue.DoesNotExist: + return HttpResponse("Template does not exist") + +def converttokabtxml(request, template): + try: + newtemplate = Queue.objects.get(pk=template) + return render_to_response("master.xml",{"newtemplate":newtemplate}) + except Queue.DoesNotExist: + return HttpResponse("Template does not exist") + +def kabtqueue(request): + queue_list = Queue.objects.filter(built=False).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}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <bms...@us...> - 2007-11-11 00:09:35
|
Revision: 2594 http://morphix.svn.sourceforge.net/morphix/?rev=2594&view=rev Author: bmsleight Date: 2007-11-10 16:08:41 -0800 (Sat, 10 Nov 2007) Log Message: ----------- Enough for one day Modified Paths: -------------- trunk/morphixlivekiosk/scripts/mbuild/settings.py trunk/morphixlivekiosk/scripts/mbuild/templates/status.html trunk/morphixlivekiosk/scripts/mbuild/web/views.py Modified: trunk/morphixlivekiosk/scripts/mbuild/settings.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/settings.py 2007-11-10 22:43:18 UTC (rev 2593) +++ trunk/morphixlivekiosk/scripts/mbuild/settings.py 2007-11-11 00:08:41 UTC (rev 2594) @@ -83,3 +83,9 @@ 'mbuild.web', 'django.contrib.admin', ) + +EMAIL_USE_TLS = True +EMAIL_HOST = 'smtp.gmail.com' +EMAIL_HOST_USER = 'liv...@go...' +EMAIL_HOST_PASSWORD = '' +EMAIL_PORT = 587 Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/status.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/status.html 2007-11-10 22:43:18 UTC (rev 2593) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/status.html 2007-11-11 00:08:41 UTC (rev 2594) @@ -1,14 +1,16 @@ <h1>Custom Built Kiosk LiveCD</h1> <h2>Status</h2> {% if newtemplate.built %} + <h3>Built!</h3> <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> + <h3>Queued For Building</h3> + <p>You build request has joined the <a href=/view-queue/>queue.</a><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> + <p>You can cheak the status of your build request at anytime by visiting this page<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> Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-10 22:43:18 UTC (rev 2593) +++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-11 00:08:41 UTC (rev 2594) @@ -4,6 +4,8 @@ from django.http import HttpResponse from django.http import HttpResponseRedirect from mbuild.web.models import Queue +from django.core.mail import EmailMessage +from django.template import loader, Context import datetime, time import elementtree.ElementTree as ET @@ -132,6 +134,11 @@ queue_list.builtogg = request.GET["v"] queue_list.builtjpg = request.GET["v"] + ".jpg" queue_list.save() + body = loader.get_template('email-build.txt') + c = Context({'queue_list': queue_list}) + email = EmailMessage(queue_list.brand, body.render(c), 'liv...@go...', + [queue_list.notifybyemail]) + email.send() return render_to_response('delete-queue.html', {'queue_list': queue_list}) else: return HttpResponse("Could not determine the successful builds - see kabt.sh documentation") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bms...@us...> - 2007-11-13 18:55:46
|
Revision: 2596 http://morphix.svn.sourceforge.net/morphix/?rev=2596&view=rev Author: bmsleight Date: 2007-11-13 10:55:31 -0800 (Tue, 13 Nov 2007) Log Message: ----------- Almost there ... Modified Paths: -------------- trunk/morphixlivekiosk/scripts/mbuild/media/style.css trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html trunk/morphixlivekiosk/scripts/mbuild/templates/index.html trunk/morphixlivekiosk/scripts/mbuild/templates/kabt-queue.html trunk/morphixlivekiosk/scripts/mbuild/templates/status.html trunk/morphixlivekiosk/scripts/mbuild/templates/step-1.html trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.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/credits.html Modified: trunk/morphixlivekiosk/scripts/mbuild/media/style.css =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/media/style.css 2007-11-11 23:26:16 UTC (rev 2595) +++ trunk/morphixlivekiosk/scripts/mbuild/media/style.css 2007-11-13 18:55:31 UTC (rev 2596) @@ -6,7 +6,7 @@ } body { - margin:0px; + margin:5px; padding:0px; font-family:verdana, arial, helvetica, sans-serif; color:#333; @@ -42,7 +42,7 @@ p { font:11px/20px verdana, arial, helvetica, sans-serif; - margin:0px 0px 16px 0px; + margin:0px 0px 0px 0px; padding:0px; } #Content>p {margin:0px;} @@ -171,6 +171,10 @@ font:11px/20px verdana, arial, helvetica, sans-serif; } +input { + font:11px/20px verdana, arial, helvetica, sans-serif; +} + ul { font:11px/20px verdana, arial, helvetica, sans-serif; } \ No newline at end of file Added: trunk/morphixlivekiosk/scripts/mbuild/templates/credits.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/credits.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/credits.html 2007-11-13 18:55:31 UTC (rev 2596) @@ -0,0 +1,31 @@ +{% extends "html-master.html" %} + +{% block content %} + +<h2>LiveCD.net</h2> +<p>The <i><a href="http://livecd.net" class="external text" title="http://livecd.net">LiveCD.net</a> stuff was create by Dusan Smolnikar (art), Gasper Koren (coding), Jure Cuhalev (coding), Ales Kristof (coding)</i>. Alot of the code has been reused. Thanks to all at liveCD.net</p> + +<h2>mbuild</h2> +<p>Jure's idea - extended by bmsleight.</p> + +<h2><a href=www.morphix.org>Morphix</a></h2> +<p>Our benevolent dictator Alextreme wrote :-</p> +<blockquote> +<p>Given the popularity of Knoppix and the vast amount of people working on derivative versions of Knoppix, it doesn't come as a surprise that people have been working to make Knoppix easier to modify and more flexible to use. In early 2003, Morphix was born out of a number of Knoppix remasters' wishes to have a version of Knoppix that was good at what they used Knoppix for: a base upon which to build their own versions using Debian GNU/Linux</p> +</blockquote> +<p>Thanks to paul_c - British humor, proof reading, gandalfar - for most of the code in MorphixLiveKiosk, Fellow morphers at #morphix</p> + +<h2>MorphixLiveKisok</h2> +<p>Good job by bmsleight</p> + +<h2>Other Web-Kiosks</h2> +<p>Kia thank-you for sharing <a href=http://webconverger.com/>Webconverger</a> Plugin. Open source - sharing not competing.</p> + +<h2><a href=http://www.debian.org>Debian</a></h2> +<p>It is cool, it is how to build a distributiion<p> + +<h2>Django</h2> +<p><a href=http://www.djangoproject.com>It is really cool</a></p> + + +{% endblock %} \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html 2007-11-11 23:26:16 UTC (rev 2595) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html 2007-11-13 18:55:31 UTC (rev 2596) @@ -8,17 +8,18 @@ <h1><img src="/img/logo.gif" id="logo" alt="mbuild.livecd.net logo" > Build Kiosks - on the web for the web.</h1> <div id="tabsE"> <ul> - <li><a href="/download/mlk/" title="Download MorphixLiveKiosk"><span>Download MorphixLiveKiosk</span></a></li> + <li><a href="/" title="about"><span>mbuild</span></a></li> + <li><a href="/kiosks//2007-11-11--22-07_MorphixLiveKiosk.iso" title="Download MorphixLiveKiosk"><span>Download MorphixLiveKiosk</span></a></li> + <li><a href="/view-queue/" title="View Build Queue"><span>View Build Queue</span></a></li> <li><a href="/start/" title="Start a New Build"><span>Start a New Build</span></a></li> - <li><a href="/view-queue/" title="View Build Queue"><span>View Build Queue</span></a></li> <li><a href="/" title="Leave Comments"><span>Leave Comments</span></a></li> - <li><a href="/" title="mbuilder.blog"><span>mbuilder.blog</span></a></li> + <li><a href="/" title="mbuilder.blog"><span>mbuild.blog</span></a></li> </ul> </div> <br /><br /> - <div id="Content"> + <div id="body"> {% block content %}{% endblock %} </div> </body> Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/index.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-11 23:26:16 UTC (rev 2595) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-13 18:55:31 UTC (rev 2596) @@ -1,17 +1,15 @@ {% extends "html-master.html" %} {% block content %} -<p>This is a new Morphix CD, based on the previous LiveCDs released by <a href="http://livecd.net" class="external text" title="http://livecd.net">LiveCD.net</a>. The <i><a href="http://livecd.net" class="external text" title="http://livecd.net">LiveCD.net</a> stuff was create by Dusan Smolnikar (art), Gasper Koren (coding), Jure Cuhalev (coding), Ales Kristof (coding)</i>. Alot of the code has been reused. Thanks to all at liveCD.net</p> +<h2>MorphixLiveKisok</h2> +<p>MorphixLiveKiosk is a new Morphix CD, based on the previous LiveCDs released by <a href="http://livecd.net" class="external text" title="http://livecd.net">LiveCD.net</a>. It is a LiveCD that contains a locked down version of firefox-browser. Boot the computer using the LiveCD you can use the browser - nothing else (well apart from a screensaver), close the brower and all the viewing history is deleted from memory. It was built using <a href=/>mbuild</a>. For licensing reasons it does not contain Java or Flash. However, <a href=/>mbuild</a> has these as optional items. MorphixLiveKiosk is designed to be easy to build, see the <a href="http://www.morphix.org">Morphix</a> Manual, <a href="http://www.morphix.org/doc/how_tos/docbook_html/ar01s05.html" class="external text" title="http://www.morphix.org/doc/how tos/docbook html/ar01s05.html">HowTo - Build a LiveCD in two commands</a></p> -<p>It is a LiveCD that contains a locked down version of firefox-browser. It was built using <a href=/>mbuild</a> +<h2>mbuild</h2> +<p>MorphixLiveKiosk is easy to build, but we want to make life even easier. Thats where mbuild joins the party - we will build a new Kiosk LiveCD, based upon your Branding, Graphics, Homepage and plugins. Want to hide the navigation bar - no problem.</p> +<h2>mbuild - How ?</h2> +<p>Fill-out the <a href=/start/>mbuild form online</a> with the seven main options, add your email address and overnight our little trained Elves will built a customised Kiosk LiveCD. The Elves will even test the LiveCD, complete will an image showing frames of how the booting went and a full video of the boot-up</p> +<p> </p> +<p>Enjoy,</p> +<p><i>mbuild team</i></p> -<p>MorphixLiveKiosk uses the <a href="http://projects.o-hand.com/matchbox/">Matchbox window manager</a>.For licensing reasons it does not contain Java or Flash. However, <a href=/>mbuild</a> has an option when building MorphixLiveKiosk to build a kiosk containing java and flash.</p> - -<p>It is designed to be easy to build, see the <a hre="http://www.morphix.org>Morphix</a> Manual<a href="http://www.morphix.org/doc/how_tos/docbook_html/ar01s05.html" class="external text" title="http://www.morphix.org/doc/how tos/docbook html/ar01s05.html">HowTo - Build a LiveCD in two commands</a> - -<p>Mention Debian and Morphix</p> - -<p>What is mbuild......<p> - -<p>Current queue status<p> {% endblock %} Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/kabt-queue.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/kabt-queue.html 2007-11-11 23:26:16 UTC (rev 2595) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/kabt-queue.html 2007-11-13 18:55:31 UTC (rev 2596) @@ -1,2 +1,2 @@ -{% if queue_list %}{% for queue in queue_list %}http://mbuild.livecd.org/xml/morphix/{{ queue.template }}/ +{% if queue_list %}{% for queue in queue_list %}http://mbuild.livecd.org/xml/morphix/{{ queue.template }} {% endfor %}{% endif %} \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/status.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/status.html 2007-11-11 23:26:16 UTC (rev 2595) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/status.html 2007-11-13 18:55:31 UTC (rev 2596) @@ -15,7 +15,7 @@ <p>You can cheak the status of your build request at anytime by visiting this page<p> {% endif %} <small> - <p><a href=/templates/{{newtemplate.template}}>Raw Template.xml</a> - <a href=/xml/morphix/{{newtemplate.template}}/>Morphix Style template.xml</a><p> + <p><a href=/templates/{{newtemplate.template}}>Raw Template.xml</a> - <a href=/xml/morphix/{{newtemplate.template}}>Morphix Style template.xml</a><p> </small> {% endblock %} Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/step-1.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/step-1.html 2007-11-11 23:26:16 UTC (rev 2595) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/step-1.html 2007-11-13 18:55:31 UTC (rev 2596) @@ -1,6 +1,12 @@ {% extends "html-master.html" %} {% block content %} +<h2>mbuild</h2> +<p>MorphixLiveKiosk is easy to build, but we want to make life even easier. Thats where mbuild joins the party - we will build a new Kiosk LiveCD, based upon your Branding, Graphics, Homepage and plugins. </p> +<h2>mbuild - How ?</h2> +<p>Fill-out a form below with the seven main options, add your email address and overnight our little trained Elves will built a customised Kiosk LiveCD. The Elves will even test the LiveCD, complete will an image showing frames of how the booting went and a full video of the boot-up</p> + +<h2>Start Your Build ....</h2> <form enctype="multipart/form-data" method="post" action="."> {{ form.as_p }} <p><input type="submit" value="Continue →"></p> Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html 2007-11-11 23:26:16 UTC (rev 2595) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html 2007-11-13 18:55:31 UTC (rev 2596) @@ -1,12 +1,12 @@ {% extends "html-master.html" %} {% block content %} - +<p>Below is a listing of the queue. {% if queue_list %} <ul> {% for queue in queue_list %} {% if queue.built %} - <li><a href=/mbuild/status/{{ queue.template }}/>{{ queue.template }}</a> <a href=http://{{ queue.homepage }}>{{ queue.brand }}</a> - Has been built ? Yep </li> + <li><a href=/mbuild/status/{{ queue.template }}/>Status Page for {{ queue.template }}</a> Branded:<a href=http://{{ queue.homepage }}>{{ queue.brand }}</a> - Has been built ? Yep </li> {% else %} <li><a href=/mbuild/status/{{ queue.template }}/>{{ queue.template }}</a> <a href=http://{{ queue.homepage }}>{{ queue.brand }}</a> - Has been built ? Not Yet </li> {% endif %} Modified: trunk/morphixlivekiosk/scripts/mbuild/urls.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-11 23:26:16 UTC (rev 2595) +++ trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-13 18:55:31 UTC (rev 2596) @@ -5,12 +5,12 @@ (r'^start/', 'mbuild.web.views.step1'), (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'^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'), + (r'^credits/', 'mbuild.web.views.credits'), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), Modified: trunk/morphixlivekiosk/scripts/mbuild/web/models.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-11 23:26:16 UTC (rev 2595) +++ trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-13 18:55:31 UTC (rev 2596) @@ -18,4 +18,7 @@ builtiso = models.CharField(maxlength="150") builtogg = models.CharField(maxlength="150") builtjpg = models.CharField(maxlength="150") - oktobuild = models.BooleanField(default=False) \ No newline at end of file + oktobuild = models.BooleanField(default=False) + + class Admin: + pass \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-11 23:26:16 UTC (rev 2595) +++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-13 18:55:31 UTC (rev 2596) @@ -17,11 +17,11 @@ def step1(request): class BuildForm(forms.Form): 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)") + graphics = forms.ImageField(required=True, label="Graphics file (Size 1024x768, (png/jpg/gif), 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')]), initial="1", label="Should the Navigation Bar be visable?") - dhcp = forms.BooleanField(widget=forms.RadioSelect(choices=[("1", 'Yes'), ("0", 'No')]), + dhcp = forms.BooleanField(widget=forms.RadioSelect(choices=[("1", 'Yes')]), initial="1", label="Use DHCP?") flash = forms.BooleanField(widget=forms.RadioSelect(choices=[("1", 'Yes'), ("0", 'No')]), label="Include Flash?", initial="0") @@ -164,6 +164,11 @@ queue_list = Queue.objects.filter(oktobuild=True).order_by('template') return render_to_response('view-queue.html', {'queue_list': queue_list}) +def credits(request): +#Yes I know Jure - I shoudl use flatpages - I will try to move to flatpages.... + return render_to_response('credits.html') + + 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. |
From: <bms...@us...> - 2007-11-18 23:15:50
|
Revision: 2597 http://morphix.svn.sourceforge.net/morphix/?rev=2597&view=rev Author: bmsleight Date: 2007-11-18 15:15:47 -0800 (Sun, 18 Nov 2007) Log Message: ----------- mbuild almost ready to go live Modified Paths: -------------- trunk/morphixlivekiosk/scripts/mbuild/media/style.css trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.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/comments.html trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html trunk/morphixlivekiosk/scripts/mbuild/templates/view-blog.html trunk/morphixlivekiosk/scripts/mbuild/templates/view-comments.html Modified: trunk/morphixlivekiosk/scripts/mbuild/media/style.css =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/media/style.css 2007-11-13 18:55:31 UTC (rev 2596) +++ trunk/morphixlivekiosk/scripts/mbuild/media/style.css 2007-11-18 23:15:47 UTC (rev 2597) @@ -61,108 +61,31 @@ a:active { color:#480000 } /* when link is clicked */ a:hover { color:#780000 } /* when mouse is over link */ -/*- Menu Tabs--------------------------- */ +#bblack { + background:#000000; +} - #tabs { - float:left; - width:100%; - font-size:93%; - line-height:normal; - } - #tabs ul { - margin:0; - padding:10px 10px 0 50px; - list-style:none; - } - #tabs li { - display:inline; - margin:0; - padding:0; - } - #tabs a { - float:left; - background:url("tableft.gif") no-repeat left top; - margin:0; - padding:0 0 0 4px; - text-decoration:none; - } - #tabs a span { - float:left; - display:block; - background:url("tabright.gif") no-repeat right top; - padding:5px 15px 4px 6px; - color:#666; - } - /* Commented Backslash Hack hides rule from IE5-Mac \*/ - #tabs a span {float:none;} - /* End IE5-Mac hack */ - #tabs a:hover span { - color:#FF9834; - } - #tabs a:hover { - background-position:0% -42px; - } - #tabs a:hover span { - background-position:100% -42px; - } +.hbuttons a{ +display: block; +text-decoration: none; +font-size: 75%; +color: #CC0000; +background: #000000; +float: centre; +display: inline; +margin-right: 2px; +margin-left: 2px; +text-align:center; +border-left:1px solid #CC0000; +border-right:1px solid #CC0000; +} -/*- Menu Tabs E--------------------------- */ +.hbuttons a:hover {background-color: #FFFFFF; +color: #780000; +text-decoration: none;} - #tabsE { - float:left; - width:100%; - background:#000; - font-size:93%; - line-height:normal; - } - #tabsE ul { - margin:0; - padding:10px 10px 0 50px; - list-style:none; - } - #tabsE li { - display:inline; - margin:0; - padding:0; - } - #tabsE a { - float:left; - background:url("tableftE.gif") no-repeat left top; - margin:0; - padding:0 0 0 4px; - text-decoration:none; - } - #tabsE a span { - float:left; - display:block; - background:url("tabrightE.gif") no-repeat right top; - padding:5px 15px 4px 6px; - color:#FFF; - } - /* Commented Backslash Hack hides rule from IE5-Mac \*/ - #tabsE a span {float:none;} - /* End IE5-Mac hack */ - #tabsE a:hover span { - color:#FFF; - } - #tabsE a:hover { - background-position:0% -42px; - } - #tabsE a:hover span { - background-position:100% -42px; - } - -/* Images */ -/*img { -/* display: block;*/ -/* margin-left: auto; */ -/* margin-right: auto */ - } - - - label,input { font:11px/20px verdana, arial, helvetica, sans-serif; } Added: trunk/morphixlivekiosk/scripts/mbuild/templates/comments.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/comments.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/comments.html 2007-11-18 23:15:47 UTC (rev 2597) @@ -0,0 +1,11 @@ +{% extends "html-master.html" %} + +{% block content %} + +<p>Please feel free to leave comments about mbuild</p> +<form enctype="multipart/form-data" method="post" action="."> + {{ form.as_p }} + <p><input type="submit" value="Notify →"></p> +</form> +<p>Spam will be deleted - it not worth the touble</p> +{% endblock %} \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html 2007-11-13 18:55:31 UTC (rev 2596) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html 2007-11-18 23:15:47 UTC (rev 2597) @@ -6,19 +6,17 @@ <title>Custom Kiosk LiveCD</title> </head> <h1><img src="/img/logo.gif" id="logo" alt="mbuild.livecd.net logo" > Build Kiosks - on the web for the web.</h1> -<div id="tabsE"> - <ul> - <li><a href="/" title="about"><span>mbuild</span></a></li> - <li><a href="/kiosks//2007-11-11--22-07_MorphixLiveKiosk.iso" title="Download MorphixLiveKiosk"><span>Download MorphixLiveKiosk</span></a></li> - <li><a href="/view-queue/" title="View Build Queue"><span>View Build Queue</span></a></li> - <li><a href="/start/" title="Start a New Build"><span>Start a New Build</span></a></li> - <li><a href="/" title="Leave Comments"><span>Leave Comments</span></a></li> - <li><a href="/" title="mbuilder.blog"><span>mbuild.blog</span></a></li> - </ul> +<div id="bblack"> + <div class="hbuttons"> + <a href="/" title="about">mbuild</a></li> + <a href="/kiosks//2007-11-11--22-07_MorphixLiveKiosk.iso" title="Download MorphixLiveKiosk">Download MorphixLiveKiosk</a> + <a href="/view-queue/" title="View Build Queue">View Build Queue</a> + <a href="/start/" title="Start a New Build">Start a New Build</a> + <a href="/comments/" title="Leave Comments">Comments</a> + <a href="/blog/" title="mbuilder.blog">mbuild.blog</a> + </div> </div> -<br /><br /> - - +</body> <div id="body"> {% block content %}{% endblock %} </div> Added: trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html 2007-11-18 23:15:47 UTC (rev 2597) @@ -0,0 +1,11 @@ +{% extends "html-master.html" %} + +{% block content %} +<h2>mbuild - Comments</h2> +<p>Please feel free to leave comments about mbuild</p> +<form enctype="multipart/form-data" method="post" action="."> + {{ form.as_p }} + <p><input type="submit" value="Notify →"></p> +</form> +<p>Spam will be deleted - it not worth the touble</p> +{% endblock %} \ No newline at end of file Added: trunk/morphixlivekiosk/scripts/mbuild/templates/view-blog.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/view-blog.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/view-blog.html 2007-11-18 23:15:47 UTC (rev 2597) @@ -0,0 +1,11 @@ +{% extends "html-master.html" %} + +{% block content %} +<h2>mbuild weblog</h2> +{% if blog_list %} + {% for blog in blog_list %} + <p><u>{{blog.title}} on the {{blog.pub_date}}</u><br /> {{blog.body}} </p> + <p> </p> + {% endfor %} +{% endif %} +{% endblock %} Added: trunk/morphixlivekiosk/scripts/mbuild/templates/view-comments.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/view-comments.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/view-comments.html 2007-11-18 23:15:47 UTC (rev 2597) @@ -0,0 +1,12 @@ +{% extends "html-master.html" %} + +{% block content %} +<p>Below is a listing of the comments received about mbuild. +{% if comments_list %} + {% for comment in comments_list %} + <p><u>{{comment.whom}} on the {{comment.pub_date}}</u><br />Wrote: <br /> {{comment.body}} </p> + <p> </p> + {% endfor %} +{% endif %} +<p><a href=/comments/leave/>What to leave a comment ?</a></p> +{% endblock %} Modified: trunk/morphixlivekiosk/scripts/mbuild/urls.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-13 18:55:31 UTC (rev 2596) +++ trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-18 23:15:47 UTC (rev 2597) @@ -11,6 +11,9 @@ (r'^kabt-queue/', 'mbuild.web.views.kabtqueue'), (r'^delete-queue/', 'mbuild.web.views.delall'), (r'^credits/', 'mbuild.web.views.credits'), + (r'^comments/leave/', 'mbuild.web.views.leavecomments'), + (r'^comments/', 'mbuild.web.views.viewcomments'), + (r'^blog/', 'mbuild.web.views.viewblog'), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), Modified: trunk/morphixlivekiosk/scripts/mbuild/web/models.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-13 18:55:31 UTC (rev 2596) +++ trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-18 23:15:47 UTC (rev 2597) @@ -19,6 +19,23 @@ builtogg = models.CharField(maxlength="150") builtjpg = models.CharField(maxlength="150") oktobuild = models.BooleanField(default=False) - class Admin: - pass \ No newline at end of file + pass + + +class Blog(models.Model): + title = models.CharField(maxlength=200) + pub_date = models.DateTimeField('Date published') + body = models.TextField() + class Admin: + pass + + +class Comments(models.Model): + whom = models.CharField(maxlength=200) + pub_date = models.DateTimeField('Date published') + body = models.TextField() + class Admin: + pass + + Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-13 18:55:31 UTC (rev 2596) +++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-18 23:15:47 UTC (rev 2597) @@ -4,6 +4,8 @@ from django.http import HttpResponse from django.http import HttpResponseRedirect from mbuild.web.models import Queue +from mbuild.web.models import Comments +from mbuild.web.models import Blog from django.core.mail import EmailMessage from django.template import loader, Context @@ -168,8 +170,29 @@ #Yes I know Jure - I shoudl use flatpages - I will try to move to flatpages.... return render_to_response('credits.html') - def delall(request): # Will disable when running live Queue.objects.all().delete() return HttpResponse("The Elves have deleted the whole queue.") + +def viewcomments(request): + comments_list = Comments.objects.all() + return render_to_response('view-comments.html', {'comments_list': comments_list}) + +def leavecomments(request): + class BuildForm(forms.Form): + whom = forms.CharField(max_length=200, required=True, label="Name of Person Leaving Comments:") + body = forms.CharField(widget=forms.Textarea) + if request.POST: + comments = Comments(whom=request.POST["whom"], pub_date=datetime.datetime.today(), body=request.POST["body"]) + comments.save() + return HttpResponseRedirect("/comments/" ) + else: + form = BuildForm() + context = {'form': form} + return render_to_response('leave-comments.html', context, + context_instance=RequestContext(request)) + +def viewblog(request): + blog_list = Blog.objects.all().order_by('-pub_date')[:5] + return render_to_response('view-blog.html', {'blog_list': blog_list}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bms...@us...> - 2007-11-19 23:07:04
|
Revision: 2598 http://morphix.svn.sourceforge.net/morphix/?rev=2598&view=rev Author: bmsleight Date: 2007-11-19 15:07:00 -0800 (Mon, 19 Nov 2007) Log Message: ----------- Payments set-up - almost there, almost there .... Modified Paths: -------------- trunk/morphixlivekiosk/scripts/mbuild/settings.py trunk/morphixlivekiosk/scripts/mbuild/templates/credits.html trunk/morphixlivekiosk/scripts/mbuild/templates/index.html trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.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/404.html trunk/morphixlivekiosk/scripts/mbuild/templates/buy-now.html trunk/morphixlivekiosk/scripts/mbuild/templates/payment-complete.html Modified: trunk/morphixlivekiosk/scripts/mbuild/settings.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/settings.py 2007-11-18 23:15:47 UTC (rev 2597) +++ trunk/morphixlivekiosk/scripts/mbuild/settings.py 2007-11-19 23:07:00 UTC (rev 2598) @@ -86,5 +86,5 @@ EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' -EMAIL_HOST_USER = 'liv...@go...' +EMAIL_HOST_USER = 'mb...@li...' EMAIL_PORT = 587 Added: trunk/morphixlivekiosk/scripts/mbuild/templates/404.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/404.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/404.html 2007-11-19 23:07:00 UTC (rev 2598) @@ -0,0 +1,8 @@ +{% extends "html-master.html" %} + +{% block content %} +<h2>Page not found</h2> + +<p>Your <a href=/comments/>comments</a> and feedback are always welcolme.</p> + +{% endblock %} \ No newline at end of file Added: trunk/morphixlivekiosk/scripts/mbuild/templates/buy-now.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/buy-now.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/buy-now.html 2007-11-19 23:07:00 UTC (rev 2598) @@ -0,0 +1,41 @@ +{% extends "html-master.html" %} + +{% block content %} +<h2>All we need now is payment for {{newtemplate.brand}} Kiosk LiveCD</h2> +<p>The cost of building a Customised kiosk LiveCD, Fully customised with your logos, brand names, plugins and homepage is GBP25.00</p> +<p><i>Non-profit organisations etc - contact mbuild - directly for special prices</i></p> + +<p>Google</p> +<form action="https://checkout.google.com/cws/v2/Merchant/837695194792377/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm"> + <input name="item_name_1" type="hidden" value="Customised Kiosk LiveCD - {{newtemplate.brand}} - {{newtemplate.template}}"/> + <input name="item_description_1" type="hidden" value="A LiveCD that contains a locked down version of a browser. Boot the computer using the LiveCD you can use the browser - nothing else (well apart from a screensaver). Fully customised with your logos, brand names, plugins and homepage"/> + <input name="item_quantity_1" type="hidden" value="1"/> + <input name="item_price_1" type="hidden" value="25.0"/> + <input name="item_currency_1" type="hidden" value="GBP"/> + <input name="_charset_" type="hidden" value="utf-8"/> + <input alt="" src="https://checkout.google.com/buttons/buy.gif?merchant_id=837695194792377&w=117&h=48&style=white&variant=text&loc=en_US" type="image"/> +</form> + + +<p>Paypal</p> +<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> +<input type="hidden" name="cmd" value="_xclick"> +<input type="hidden" name="business" value="mb...@li..."> +<input type="hidden" name="item_name" value="Customised Kiosk LiveCD - {{newtemplate.brand}} - {{newtemplate.template}}"> +<input type="hidden" name="amount" value="25.00"> +<input type="hidden" name="shipping" value="0.00"> +<input type="hidden" name="page_style" value="Primary"> +<input type="hidden" name="no_shipping" value="1"> +<input type="hidden" name="return" value="http://mbuild.livecd.org/payment-complete/"> +<input type="hidden" name="no_note" value="1"> +<input type="hidden" name="currency_code" value="GBP"> +<input type="hidden" name="tax" value="0.00"> +<input type="hidden" name="lc" value="GB"> +<input type="hidden" name="bn" value="PP-BuyNowBF"> +<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> +<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1"> +</form> + +<p><a href=/payment-complete/>When Payment Completed ...</a></p> + +{% endblock %} \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/credits.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/credits.html 2007-11-18 23:15:47 UTC (rev 2597) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/credits.html 2007-11-19 23:07:00 UTC (rev 2598) @@ -8,7 +8,7 @@ <h2>mbuild</h2> <p>Jure's idea - extended by bmsleight.</p> -<h2><a href=www.morphix.org>Morphix</a></h2> +<h2><a href="http://www.morphix.org">Morphix</a></h2> <p>Our benevolent dictator Alextreme wrote :-</p> <blockquote> <p>Given the popularity of Knoppix and the vast amount of people working on derivative versions of Knoppix, it doesn't come as a surprise that people have been working to make Knoppix easier to modify and more flexible to use. In early 2003, Morphix was born out of a number of Knoppix remasters' wishes to have a version of Knoppix that was good at what they used Knoppix for: a base upon which to build their own versions using Debian GNU/Linux</p> @@ -16,7 +16,7 @@ <p>Thanks to paul_c - British humor, proof reading, gandalfar - for most of the code in MorphixLiveKiosk, Fellow morphers at #morphix</p> <h2>MorphixLiveKisok</h2> -<p>Good job by bmsleight</p> +<p>Good job by <a href="http://www.barwap.com/blog/">bmsleight</a></p> <h2>Other Web-Kiosks</h2> <p>Kia thank-you for sharing <a href=http://webconverger.com/>Webconverger</a> Plugin. Open source - sharing not competing.</p> Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/index.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-18 23:15:47 UTC (rev 2597) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-19 23:07:00 UTC (rev 2598) @@ -1,13 +1,13 @@ {% extends "html-master.html" %} {% block content %} -<h2>MorphixLiveKisok</h2> +<h2>MorphixLiveKiosk</h2> <p>MorphixLiveKiosk is a new Morphix CD, based on the previous LiveCDs released by <a href="http://livecd.net" class="external text" title="http://livecd.net">LiveCD.net</a>. It is a LiveCD that contains a locked down version of firefox-browser. Boot the computer using the LiveCD you can use the browser - nothing else (well apart from a screensaver), close the brower and all the viewing history is deleted from memory. It was built using <a href=/>mbuild</a>. For licensing reasons it does not contain Java or Flash. However, <a href=/>mbuild</a> has these as optional items. MorphixLiveKiosk is designed to be easy to build, see the <a href="http://www.morphix.org">Morphix</a> Manual, <a href="http://www.morphix.org/doc/how_tos/docbook_html/ar01s05.html" class="external text" title="http://www.morphix.org/doc/how tos/docbook html/ar01s05.html">HowTo - Build a LiveCD in two commands</a></p> <h2>mbuild</h2> <p>MorphixLiveKiosk is easy to build, but we want to make life even easier. Thats where mbuild joins the party - we will build a new Kiosk LiveCD, based upon your Branding, Graphics, Homepage and plugins. Want to hide the navigation bar - no problem.</p> <h2>mbuild - How ?</h2> -<p>Fill-out the <a href=/start/>mbuild form online</a> with the seven main options, add your email address and overnight our little trained Elves will built a customised Kiosk LiveCD. The Elves will even test the LiveCD, complete will an image showing frames of how the booting went and a full video of the boot-up</p> +<p>Fill-out the <a href=/start/>mbuild form online</a> with the seven main options, add your email address and our little trained Elves will built a customised Kiosk LiveCD. The Elves will even test the LiveCD, complete will an image showing frames of how the booting went and a full video of the boot-up - all for GBP25. The GBP25 is to help maintain and feed the Elves. The Elves will take <a href="http://www.paypal.co.uk/uk">Paypal</a> or <a href="http://checkout.google.com">Google-Checkout</a>. Please note the Elves can only do about three builds a day before they get tired, normally a request gets built within 24 hours, but depending how many templates are waitng to be build there may be a delay. </p> <p> </p> <p>Enjoy,</p> <p><i>mbuild team</i></p> Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html 2007-11-18 23:15:47 UTC (rev 2597) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html 2007-11-19 23:07:00 UTC (rev 2598) @@ -5,7 +5,7 @@ <p>Please feel free to leave comments about mbuild</p> <form enctype="multipart/form-data" method="post" action="."> {{ form.as_p }} - <p><input type="submit" value="Notify →"></p> + <p><input type="submit" value="Leave Coments →"></p> </form> <p>Spam will be deleted - it not worth the touble</p> {% endblock %} \ No newline at end of file Added: trunk/morphixlivekiosk/scripts/mbuild/templates/payment-complete.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/payment-complete.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/payment-complete.html 2007-11-19 23:07:00 UTC (rev 2598) @@ -0,0 +1,11 @@ +{% extends "html-master.html" %} + +{% block content %} +<h2>Payment Complete</h2> + +<p>Payment is being processed </p> +<p>Once we have received the ok from the either paypal or google-checkout. The build can proceed. +In the meantime check the status of the <a href=/view-queue/>build-queue</p> +<p>Your <a href=/comments/>comments</a> and feedback are always welcolme.</p> + +{% endblock %} \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html 2007-11-18 23:15:47 UTC (rev 2597) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/view-queue.html 2007-11-19 23:07:00 UTC (rev 2598) @@ -1,14 +1,18 @@ {% extends "html-master.html" %} {% block content %} -<p>Below is a listing of the queue. +<p>Below is a listing of the queue. Builds happen at 15:00, 18:00 and 21:00 GMT everyday. </p> {% if queue_list %} <ul> {% for queue in queue_list %} {% if queue.built %} <li><a href=/mbuild/status/{{ queue.template }}/>Status Page for {{ queue.template }}</a> Branded:<a href=http://{{ queue.homepage }}>{{ queue.brand }}</a> - Has been built ? Yep </li> {% else %} - <li><a href=/mbuild/status/{{ queue.template }}/>{{ queue.template }}</a> <a href=http://{{ queue.homepage }}>{{ queue.brand }}</a> - Has been built ? Not Yet </li> + {% if queue.paid %} + <li><i><a href=/mbuild/status/{{ queue.template }}/>{{ queue.template }}</a> <a href=http://{{ queue.homepage }}>{{ queue.brand }}</a> - Payment Recieved - Has been built ? Not Yet </i></li> + {% else %} + <li><i><a href=/mbuild/status/{{ queue.template }}/>{{ queue.template }}</a> <a href=http://{{ queue.homepage }}>{{ queue.brand }}</a> - Payment being Processed - Has been built ? Not Yet </i></li> + {% endif %} {% endif %} {% endfor %} </ul> Modified: trunk/morphixlivekiosk/scripts/mbuild/urls.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-18 23:15:47 UTC (rev 2597) +++ trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-19 23:07:00 UTC (rev 2598) @@ -5,6 +5,7 @@ (r'^start/', 'mbuild.web.views.step1'), (r'^mbuild/terms/(?P<template>[^/]+)/', 'mbuild.web.views.acceptterms'), (r'^mbuild/status/(?P<template>[^/]+)/', 'mbuild.web.views.mbuildstatus'), + (r'^mbuild/buynow/(?P<template>[^/]+)/', 'mbuild.web.views.buynow'), (r'^xml/morphix/(?P<template>[^/]+)', 'mbuild.web.views.converttokabtxml'), (r'^mbuild/(?P<template>[^/]+)/', 'mbuild.web.views.mbuild'), (r'^view-queue/', 'mbuild.web.views.viewqueue'), @@ -14,6 +15,7 @@ (r'^comments/leave/', 'mbuild.web.views.leavecomments'), (r'^comments/', 'mbuild.web.views.viewcomments'), (r'^blog/', 'mbuild.web.views.viewblog'), + (r'^payment-complete/', 'mbuild.web.views.paymentcomplete'), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), Modified: trunk/morphixlivekiosk/scripts/mbuild/web/models.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-18 23:15:47 UTC (rev 2597) +++ trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-19 23:07:00 UTC (rev 2598) @@ -13,16 +13,21 @@ 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") + dhcp = models.BooleanField(default=True) + builtdomain = models.CharField(maxlength="150", blank=True) + builtiso = models.CharField(maxlength="150", blank=True) + builtogg = models.CharField(maxlength="150", blank=True) + builtjpg = models.CharField(maxlength="150", blank=True) oktobuild = models.BooleanField(default=False) + paid = models.BooleanField(default=False) + class Admin: - pass +# pass + list_display = ('brand', 'template', 'paid', 'oktobuild') + list_filter = ('paid', 'oktobuild') + ordering = ('template',) + search_fields = ('brand',) - class Blog(models.Model): title = models.CharField(maxlength=200) pub_date = models.DateTimeField('Date published') Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-18 23:15:47 UTC (rev 2597) +++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-19 23:07:00 UTC (rev 2598) @@ -101,13 +101,21 @@ newtemplate.save() except Queue.DoesNotExist: return HttpResponse("Template does not exist") - return HttpResponseRedirect("/mbuild/status/%s/" % template ) + return HttpResponseRedirect("/mbuild/buynow/%s/" % template ) else: form = BuildForm() context = {'form': form} return render_to_response('template.html', context, context_instance=RequestContext(request)) +def buynow(request, template): + try: + newtemplate = Queue.objects.get(pk=template) + return render_to_response("buy-now.html",{"newtemplate":newtemplate}) + except Queue.DoesNotExist: + return HttpResponse("Template does not exist") + + def mbuildstatus(request, template): try: newtemplate = Queue.objects.get(pk=template) @@ -125,7 +133,7 @@ def kabtqueue(request): # queue_list = Queue.objects.filter(built=False, oktobuild=True).order_by('template')[0] if request.GET: - queue_list = Queue.objects.filter(built=False, oktobuild=True).order_by('template')[0] + queue_list = Queue.objects.filter(built=False, oktobuild=True, paid=True).order_by('template')[0] queue_list.built = True queue_list.builtdomain = request.GET["built"] queue_list.builtiso = request.GET["i"] @@ -139,7 +147,7 @@ email.send() return render_to_response('delete-queue.html', {'queue_list': queue_list}) else: - queue_list = Queue.objects.filter(built=False, oktobuild=True).order_by('template') + queue_list = Queue.objects.filter(built=False, oktobuild=True, paid=True).order_by('template') return render_to_response('kabt-queue.html', {'queue_list': queue_list}) def sucessfulbuild(request): @@ -170,6 +178,10 @@ #Yes I know Jure - I shoudl use flatpages - I will try to move to flatpages.... return render_to_response('credits.html') +def paymentcomplete(request): +#Yes I know Jure - I shoudl use flatpages - I will try to move to flatpages.... + return render_to_response('payment-complete.html') + 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. |
From: <bms...@us...> - 2007-11-20 19:22:02
|
Revision: 2599 http://morphix.svn.sourceforge.net/morphix/?rev=2599&view=rev Author: bmsleight Date: 2007-11-20 11:21:57 -0800 (Tue, 20 Nov 2007) Log Message: ----------- Supplying an image is optional - As per Jure's request :) Modified Paths: -------------- trunk/morphixlivekiosk/scripts/mbuild/media/style.css trunk/morphixlivekiosk/scripts/mbuild/settings.py trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html trunk/morphixlivekiosk/scripts/mbuild/templates/index.html trunk/morphixlivekiosk/scripts/mbuild/urls.py trunk/morphixlivekiosk/scripts/mbuild/web/views.py Added Paths: ----------- trunk/morphixlivekiosk/scripts/mbuild/media/favicon.ico trunk/morphixlivekiosk/scripts/mbuild/templates/downloads.html Added: trunk/morphixlivekiosk/scripts/mbuild/media/favicon.ico =================================================================== (Binary files differ) Property changes on: trunk/morphixlivekiosk/scripts/mbuild/media/favicon.ico ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/morphixlivekiosk/scripts/mbuild/media/style.css =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/media/style.css 2007-11-19 23:07:00 UTC (rev 2598) +++ trunk/morphixlivekiosk/scripts/mbuild/media/style.css 2007-11-20 19:21:57 UTC (rev 2599) @@ -3,6 +3,10 @@ font-size: 8px; text-align: right; background:#000; + border-left:2px solid #CC0000; + border-right:2px solid #CC0000; + border-top:2px solid #CC0000; + border-bottom:2px solid #CC0000; } body { @@ -63,6 +67,12 @@ #bblack { background:#000000; + margin:1px 1px 1px 1px; + border-left:2px solid #CC0000; + border-right:2px solid #CC0000; + border-top:2px solid #CC0000; + border-bottom:2px solid #CC0000; + } .hbuttons a{ @@ -70,7 +80,7 @@ text-decoration: none; font-size: 75%; color: #CC0000; -background: #000000; +background: #FFFFFF; float: centre; display: inline; margin-right: 2px; @@ -78,7 +88,6 @@ text-align:center; border-left:1px solid #CC0000; border-right:1px solid #CC0000; - } .hbuttons a:hover {background-color: #FFFFFF; Modified: trunk/morphixlivekiosk/scripts/mbuild/settings.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/settings.py 2007-11-19 23:07:00 UTC (rev 2598) +++ trunk/morphixlivekiosk/scripts/mbuild/settings.py 2007-11-20 19:21:57 UTC (rev 2599) @@ -2,7 +2,7 @@ import os here = lambda x: os.path.join(os.path.dirname(__file__),x) -DEBUG = True +DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( Added: trunk/morphixlivekiosk/scripts/mbuild/templates/downloads.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/downloads.html (rev 0) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/downloads.html 2007-11-20 19:21:57 UTC (rev 2599) @@ -0,0 +1,19 @@ +{% extends "html-master.html" %} + +{% block content %} + +<h2>MorphixLiveKiosk</h2> +<p>The orginal MorphixLiveKiosk, version 0.04. This is the basis for all of the customised kiosks, it is worth looking at this example before paying the Elves to build a customised kiosk LiveCD. It will give you a good idea of this final product.</p> +<ul> + <li><a href="http://downloads.sourceforge.net/morphix/2007-11-19--23-00_MorphixLiveKiosk.ogg?use_mirror=osdn">Download MorphixLiveKiosk 0.04 - AutoTesting video</a></li> + <li><a href="http://downloads.sourceforge.net/morphix/2007-11-19--23-00_MorphixLiveKiosk.iso?use_mirror=osdn">Download MorphixLiveKiosk 0.04 iso</a></li> + <li><a href="http://downloads.sourceforge.net/morphix/2007-11-19--23-00_MorphixLiveKiosk.iso.md5sum?use_mirror=osdn">Download MorphixLiveKiosk 0.04 md5sum</a></li> +</ul> + +<h2>Tools Used</h2> +<p>You can download all the tools to build ans customise your own kiosk LiveCD, mbuild is a service to fast track your build. All the tools, parts of MorphixLiveKiosk and the customisation tools are open-source.</p> +<p>The tools are from <a href="http://www.morphix.org">Morphix.org</a>. How to build MorphixLiveKiosk is detail in the manual <a href="http://www.morphix.org/doc/how_tos/docbook_html/ar01s05.html">"HowTo: Building a new LiveCD in two commands"</a>. To automate the build rocess for customised kiosk LiveCD, a script <a href="http://morphix.svn.sourceforge.net/viewvc/morphix/trunk/morphixlivekiosk/scripts/kabt.sh?view=markup">kabt</a> was used. The <a href="http://morphix.svn.sourceforge.net/viewvc/morphix/trunk/morphixlivekiosk/scripts/mbuild/">mbuild source code</a> and an <a href="http://morphix.svn.sourceforge.net/viewvc/*checkout*/morphix/trunk/morphixlivekiosk/templates/MLK-example.xml?revision=2575&content-type=text%2Fplain">example template</a> to pass to kabt (-t) is available via the morphix repository.</p> +<p>Morphix tools are used to make the LiveCD the underlying packages are from the <a href="http://packages.debian.org/stable/">Debian Etch repository</a>.</p> + + +{% endblock %} \ No newline at end of file Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html 2007-11-19 23:07:00 UTC (rev 2598) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html 2007-11-20 19:21:57 UTC (rev 2599) @@ -3,20 +3,21 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <link rel="stylesheet" href="/css/style.css" /> - <title>Custom Kiosk LiveCD</title> + <LINK REL="SHORCUT ICON" HREF="/img/favicon.ico"> + <title>mbuild - Custom Kiosk LiveCD</title> </head> +<body> <h1><img src="/img/logo.gif" id="logo" alt="mbuild.livecd.net logo" > Build Kiosks - on the web for the web.</h1> <div id="bblack"> <div class="hbuttons"> <a href="/" title="about">mbuild</a></li> - <a href="/kiosks//2007-11-11--22-07_MorphixLiveKiosk.iso" title="Download MorphixLiveKiosk">Download MorphixLiveKiosk</a> + <a href="/downloads/" title="Download MorphixLiveKiosk">Download MorphixLiveKiosk</a> <a href="/view-queue/" title="View Build Queue">View Build Queue</a> <a href="/start/" title="Start a New Build">Start a New Build</a> <a href="/comments/" title="Leave Comments">Comments</a> <a href="/blog/" title="mbuilder.blog">mbuild.blog</a> </div> </div> -</body> <div id="body"> {% block content %}{% endblock %} </div> Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/index.html =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-19 23:07:00 UTC (rev 2598) +++ trunk/morphixlivekiosk/scripts/mbuild/templates/index.html 2007-11-20 19:21:57 UTC (rev 2599) @@ -2,12 +2,12 @@ {% block content %} <h2>MorphixLiveKiosk</h2> -<p>MorphixLiveKiosk is a new Morphix CD, based on the previous LiveCDs released by <a href="http://livecd.net" class="external text" title="http://livecd.net">LiveCD.net</a>. It is a LiveCD that contains a locked down version of firefox-browser. Boot the computer using the LiveCD you can use the browser - nothing else (well apart from a screensaver), close the brower and all the viewing history is deleted from memory. It was built using <a href=/>mbuild</a>. For licensing reasons it does not contain Java or Flash. However, <a href=/>mbuild</a> has these as optional items. MorphixLiveKiosk is designed to be easy to build, see the <a href="http://www.morphix.org">Morphix</a> Manual, <a href="http://www.morphix.org/doc/how_tos/docbook_html/ar01s05.html" class="external text" title="http://www.morphix.org/doc/how tos/docbook html/ar01s05.html">HowTo - Build a LiveCD in two commands</a></p> +<p>MorphixLiveKiosk is a Morphix CD, based on the previous LiveCDs released by <a href="http://livecd.net" class="external text" title="http://livecd.net">LiveCD.net</a>. It is a LiveCD that contains a locked down version of firefox-browser. Boot the computer using the LiveCD and you can use the browser - nothing else (well apart from a screensaver), close the brower and all the viewing history is deleted from memory. It was built using <a href=/>mbuild</a>. For licensing reasons it does not contain Java or Flash. However, <a href=/>mbuild</a> has these as optional items. MorphixLiveKiosk is designed to be easy to build, see the <a href="http://www.morphix.org">Morphix</a> Manual, <a href="http://www.morphix.org/doc/how_tos/docbook_html/ar01s05.html" class="external text" title="http://www.morphix.org/doc/how tos/docbook html/ar01s05.html">HowTo - Build a LiveCD in two commands</a>. This is now version 0.04 of MorphixLiveKiosk.</p> <h2>mbuild</h2> <p>MorphixLiveKiosk is easy to build, but we want to make life even easier. Thats where mbuild joins the party - we will build a new Kiosk LiveCD, based upon your Branding, Graphics, Homepage and plugins. Want to hide the navigation bar - no problem.</p> <h2>mbuild - How ?</h2> -<p>Fill-out the <a href=/start/>mbuild form online</a> with the seven main options, add your email address and our little trained Elves will built a customised Kiosk LiveCD. The Elves will even test the LiveCD, complete will an image showing frames of how the booting went and a full video of the boot-up - all for GBP25. The GBP25 is to help maintain and feed the Elves. The Elves will take <a href="http://www.paypal.co.uk/uk">Paypal</a> or <a href="http://checkout.google.com">Google-Checkout</a>. Please note the Elves can only do about three builds a day before they get tired, normally a request gets built within 24 hours, but depending how many templates are waitng to be build there may be a delay. </p> +<p>Fill-out the <a href=/start/>mbuild form online</a> with the seven main options, add your email address and our little trained Elves will built a customised Kiosk LiveCD. The Elves will even test the LiveCD, complete will an image showing frames of how the booting went and a full video of the boot-up - all for GBP25. The GBP25 is to help maintain and feed the Elves. The Elves will take <a href="http://www.paypal.co.uk/uk">Paypal</a> or <a href="http://checkout.google.com">Google-Checkout</a>. Please note the Elves can only do about three builds a day before they get tired, normally a request gets built within 24 hours, but depending how many templates are <a href=/view-queue/>waiting to be built</a> there may be a delay. </p> <p> </p> <p>Enjoy,</p> <p><i>mbuild team</i></p> Modified: trunk/morphixlivekiosk/scripts/mbuild/urls.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-19 23:07:00 UTC (rev 2598) +++ trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-20 19:21:57 UTC (rev 2599) @@ -12,6 +12,7 @@ (r'^kabt-queue/', 'mbuild.web.views.kabtqueue'), (r'^delete-queue/', 'mbuild.web.views.delall'), (r'^credits/', 'mbuild.web.views.credits'), + (r'^downloads/', 'mbuild.web.views.downloads'), (r'^comments/leave/', 'mbuild.web.views.leavecomments'), (r'^comments/', 'mbuild.web.views.viewcomments'), (r'^blog/', 'mbuild.web.views.viewblog'), Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py =================================================================== --- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-19 23:07:00 UTC (rev 2598) +++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-20 19:21:57 UTC (rev 2599) @@ -19,8 +19,8 @@ def step1(request): class BuildForm(forms.Form): 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=True, label="Graphics file (Size 1024x768, (png/jpg/gif), works best)") homepage = forms.CharField(max_length=150, required=True, label="Desired homepage http://", initial="www.morphix.org") + graphics = forms.ImageField(required=False, label="Graphics file (Size 1024x768, (png/jpg/gif), works best) - leave blank to use MorphixLIveKiosk graphics.") nav_bar = forms.BooleanField(widget=forms.RadioSelect(choices=[("1", 'Yes'), ("0", 'No')]), initial="1", label="Should the Navigation Bar be visable?") dhcp = forms.BooleanField(widget=forms.RadioSelect(choices=[("1", 'Yes')]), @@ -43,6 +43,8 @@ f.write(cd['graphics'].content) f.close() cd['graphics'] = "%s" % uniq + "-" + cd['graphics'].filename + else: + cd['graphics'] = "MorphixLiveKiosk.png" root = ET.Element("LIVECD") for v in cd: @@ -178,6 +180,11 @@ #Yes I know Jure - I shoudl use flatpages - I will try to move to flatpages.... return render_to_response('credits.html') +def downloads(request): +#Yes I know Jure - I shoudl use flatpages - I will try to move to flatpages.... + return render_to_response('downloads.html') + + def paymentcomplete(request): #Yes I know Jure - I shoudl use flatpages - I will try to move to flatpages.... return render_to_response('payment-complete.html') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |