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

[email protected] Fri, 02 Nov 2007 15:14:45 -0700
Newsgroups gmane.linux.morphix.cvs
Message-ID <[email protected]>
Revision: 2582
          http://morphix.svn.sourceforge.net/morphix/?rev=2582&view=rev
Author:   gandalfar
Date:     2007-11-02 15:14:44 -0700 (Fri, 02 Nov 2007)

Log Message:
-----------
initial mbuild commit

Added Paths:
-----------
    trunk/morphixlivekiosk/scripts/mbuild/
    trunk/morphixlivekiosk/scripts/mbuild/__init__.py
    trunk/morphixlivekiosk/scripts/mbuild/incoming/
    trunk/morphixlivekiosk/scripts/mbuild/manage.py
    trunk/morphixlivekiosk/scripts/mbuild/media/
    trunk/morphixlivekiosk/scripts/mbuild/settings.py
    trunk/morphixlivekiosk/scripts/mbuild/templates/
    trunk/morphixlivekiosk/scripts/mbuild/templates/index.html
    trunk/morphixlivekiosk/scripts/mbuild/urls.py
    trunk/morphixlivekiosk/scripts/mbuild/web/
    trunk/morphixlivekiosk/scripts/mbuild/web/__init__.py
    trunk/morphixlivekiosk/scripts/mbuild/web/models.py
    trunk/morphixlivekiosk/scripts/mbuild/web/views.py

Added: trunk/morphixlivekiosk/scripts/mbuild/__init__.py
===================================================================

Added: trunk/morphixlivekiosk/scripts/mbuild/manage.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/manage.py	                        (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/manage.py	2007-11-02 22:14:44 UTC (rev 2582)
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+from django.core.management import execute_manager
+try:
+    import settings # Assumed to be in the same directory.
+except ImportError:
+    import sys
+    sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
+    sys.exit(1)
+
+if __name__ == "__main__":
+    execute_manager(settings)


Property changes on: trunk/morphixlivekiosk/scripts/mbuild/manage.py
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/morphixlivekiosk/scripts/mbuild/settings.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/settings.py	                        (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/settings.py	2007-11-02 22:14:44 UTC (rev 2582)
@@ -0,0 +1,84 @@
+# Django settings for mbuild project.
+import os
+here = lambda x: os.path.join(os.path.dirname(__file__),x)
+
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+ADMINS = (
+    # ('Your Name', 'your_email-9IKiO1iGCm/[email protected]'),
+)
+
+MANAGERS = ADMINS
+
+DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+DATABASE_NAME = here('mbuild.db')             # Or path to database file if using sqlite3.
+DATABASE_USER = ''             # Not used with sqlite3.
+DATABASE_PASSWORD = ''         # Not used with sqlite3.
+DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
+DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+
+# Local time zone for this installation. Choices can be found here:
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
+# although not all choices may be avilable on all operating systems.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = 'Europe/London'
+
+# Language code for this installation. All choices can be found here:
+# http://www.i18nguy.com/unicode/language-identifiers.html
+LANGUAGE_CODE = 'en-us'
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+MEDIA_ROOT = here('media/')
+
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
+# trailing slash if there is a path component (optional in other cases).
+# Examples: "http://media.lawrence.com", "http://example.com/media/"
+MEDIA_URL = ''
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
+ADMIN_MEDIA_PREFIX = '/media/'
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = 'r%v55owvj@9mn-3zj+8f5&an)b1d+7pzd(im=vf+^bij+*1cpk'
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+    'django.template.loaders.filesystem.load_template_source',
+    'django.template.loaders.app_directories.load_template_source',
+#     'django.template.loaders.eggs.load_template_source',
+)
+
+MIDDLEWARE_CLASSES = (
+    'django.middleware.common.CommonMiddleware',
+    'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.middleware.doc.XViewMiddleware',
+)
+
+ROOT_URLCONF = 'mbuild.urls'
+
+TEMPLATE_DIRS = (
+    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
+    # Always use forward slashes, even on Windows.
+    # Don't forget to use absolute paths, not relative paths.
+    here('templates'),
+)
+
+INSTALLED_APPS = (
+    'django.contrib.auth',
+    'django.contrib.contenttypes',
+    'django.contrib.sessions',
+    'django.contrib.sites',
+    'mbuild.web',
+)

Added: trunk/morphixlivekiosk/scripts/mbuild/templates/index.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/index.html	                        (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/index.html	2007-11-02 22:14:44 UTC (rev 2582)
@@ -0,0 +1,5 @@
+<form action="." method="post" accept-charset="utf-8">
+  {{ form.as_p }}
+
+  <p><input type="submit" value="Continue &rarr;"></p>
+</form>

Added: trunk/morphixlivekiosk/scripts/mbuild/urls.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/urls.py	                        (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/urls.py	2007-11-02 22:14:44 UTC (rev 2582)
@@ -0,0 +1,9 @@
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('',
+      (r'^$', 'mbuild.web.views.index'),
+
+    # Uncomment this for admin:
+#     (r'^admin/', include('django.contrib.admin.urls')),
+
+)

Added: trunk/morphixlivekiosk/scripts/mbuild/web/__init__.py
===================================================================

Added: trunk/morphixlivekiosk/scripts/mbuild/web/models.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/web/models.py	                        (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/web/models.py	2007-11-02 22:14:44 UTC (rev 2582)
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

Added: trunk/morphixlivekiosk/scripts/mbuild/web/views.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/web/views.py	                        (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py	2007-11-02 22:14:44 UTC (rev 2582)
@@ -0,0 +1,29 @@
+from django.shortcuts import render_to_response
+from django.template import RequestContext
+from django import newforms as forms
+
+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)
+    dhcp = forms.BooleanField(widget=forms.RadioSelect(choices=[(True, 'Yes'), (False, 'No')]),
+            initial=True)
+    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
+  else:
+    form = BuildForm()
+    
+  context = {'form': form}
+  return render_to_response('index.html', context,
+                            context_instance=RequestContext(request))
\ No newline at end of file


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/