[SCM] live-studio branch, master, updated. be51da814fb12d25dce46a7f078a46f5c89bd777

Chris Lamb lamby at debian.org
Fri Jul 30 02:52:33 UTC 2010


The following commit has been merged in the master branch:
commit c5283a2a6783915f06bc2b6667ae97eac3a04a45
Author: Chris Lamb <lamby at debian.org>
Date:   Wed Jul 28 17:03:20 2010 -0400

    Add the first stab at a Config model.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>

diff --git a/live_studio_www/config/models.py b/live_studio_www/config/models.py
new file mode 100644
index 0000000..475b275
--- /dev/null
+++ b/live_studio_www/config/models.py
@@ -0,0 +1,81 @@
+import datetime
+
+from django.db import models
+from django.contrib.auth.models import User
+
+from live_studio_www import data
+
+class Config(models.Model):
+    user = models.ForeignKey(User, related_name='configs')
+    created = models.DateTimeField(default=datetime.datetime.utcnow)
+
+    name = models.CharField(
+        max_length=150,
+        default='Untitled configuration',
+    )
+
+    base = models.CharField(
+        max_length=8,
+        default='standard',
+        choices=(
+            ('standard',    'Standard Debian GNU/Linux image'),
+            ('gnome',       'GNOME desktop environment'),
+            ('kde',         'KDE desktop environment'),
+            ('xfce',        'Xfce desktop environment'),
+            ('rescue',      'Debian GNU/Linux rescue image'),
+        ),
+    )
+
+    distribution = models.CharField(
+        max_length=7,
+        default='lenny',
+        choices=(
+            ('lenny',   'Debian GNU/Linux 5.0 ("lenny")'),
+            ('squeeze', 'Debian GNU/Linux testing distribution ("squeeze")'),
+            ('sid',     'Debian GNU/Linux unstable distribution ("sid")'),
+        ),
+    )
+
+    media_type = models.CharField(
+        max_length=7,
+        default='iso',
+        choices=(
+            ('iso',     'ISO image for a CD or DVD'),
+            ('usb-hdd', 'USB / HDD image'),
+            ('net',     'Network boot image'),
+        )
+    )
+
+    architecture = models.CharField(
+        max_length=5,
+        default='i386',
+        choices=(
+            ('i386',  'i386 (x86_32)'),
+            ('amd64', 'amd64 (x86_64)'),
+        )
+    )
+
+    installer = models.CharField(
+        max_length=4,
+        default='no',
+        choices=(
+            ('no',   'No installer integration'),
+            ('live', '"Live" installer integration'),
+            ('yes',  'Standard installer integration'),
+        )
+    )
+
+    locale = models.CharField(
+        default='en_US.UTF-8',
+        max_length=30,
+        choices=data.LOCALES,
+    )
+
+    keyboard_layout = models.CharField(
+        default='us',
+        max_length=20,
+        choices=data.KEYBOARD_LAYOUTS,
+    )
+
+    def __unicode__(self):
+        return "%s: name=%s" % (self.user.username, self.name)

-- 
live-studio



More information about the debian-live-changes mailing list