SF.net SVN: morphix: [2598] trunk/morphixlivekiosk/scripts/mbuild

[email protected] Mon, 19 Nov 2007 15:07:01 -0800
Newsgroups gmane.linux.morphix.cvs
Message-ID <[email protected]>
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 = 'livecd.org-gM/[email protected]'
+EMAIL_HOST_USER = '[email protected]'
 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&amp;w=117&amp;h=48&amp;style=white&amp;variant=text&amp;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="[email protected]">
+<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>&nbsp</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 &rarr;"></p>
+  <p><input type="submit" value="Leave Coments &rarr;"></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.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/