[Debconf-video-commits] r346 - in package/branches/pycon09/src/debconfvideo/web: . pyconvideo

benh at alioth.debian.org benh at alioth.debian.org
Fri Mar 20 05:05:42 UTC 2009


Author: benh
Date: 2009-03-20 05:05:41 +0000 (Fri, 20 Mar 2009)
New Revision: 346

Added:
   package/branches/pycon09/src/debconfvideo/web/pyconvideo/
   package/branches/pycon09/src/debconfvideo/web/pyconvideo/__init__.py
   package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py
   package/branches/pycon09/src/debconfvideo/web/pyconvideo/views.py
Modified:
   package/branches/pycon09/src/debconfvideo/web/settings.py
   package/branches/pycon09/src/debconfvideo/web/urls.py
Log:
Add an application to the Django site.
Add model definition based on the existing schema.
Enable admin interface.


Added: package/branches/pycon09/src/debconfvideo/web/pyconvideo/__init__.py
===================================================================

Added: package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py
===================================================================
--- package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py	                        (rev 0)
+++ package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py	2009-03-20 05:05:41 UTC (rev 346)
@@ -0,0 +1,94 @@
+# Based on auto-generated Django model code.
+
+from django.db import models
+
+class IntervalField(models.TextField):
+    # TODO
+    pass
+
+class Conference(models.Model):
+    conference_id = models.AutoField(primary_key=True)
+    title = models.CharField(unique=True, max_length=200)
+    homepage = models.CharField(max_length=100)
+    timezone = models.CharField(max_length=50)
+    class Meta:
+        db_table = u'conference'
+
+class ConferenceRoom(models.Model):
+    conference = models.ForeignKey(Conference)
+    # Not really the primary key, but this will only be used for one conference
+    conference_room = models.CharField(primary_key=True, max_length=100)
+    class Meta:
+        db_table = u'conference_room'
+
+class Event(models.Model):
+    event_id = models.AutoField(primary_key=True)
+    source_url = models.CharField(unique=True, max_length=200)
+    conference_id = models.IntegerField()
+    conference_room = models.ForeignKey(ConferenceRoom)
+    title = models.CharField(max_length=200)
+    description = models.CharField(max_length=4000)
+    start_time = models.DateTimeField()
+    duration = IntervalField()
+    class Meta:
+        db_table = u'event'
+
+class VideoFileStatus(models.Model):
+    id = models.AutoField(primary_key=True)
+    file_status_code = models.CharField(unique=True, max_length=1)
+    file_status_desc = models.CharField(max_length=1000)
+    class Meta:
+        db_table = u'video_file_status'
+
+class VideoRecording(models.Model):
+    id = models.AutoField(primary_key=True)
+    conference_id = models.IntegerField()
+    conference_room = models.ForeignKey(ConferenceRoom)
+    recording_time = models.DateTimeField()
+    recording_duration = IntervalField()
+    recording_filename = models.CharField(unique=True, max_length=100)
+    file_status = models.ForeignKey(VideoFileStatus)
+    comments = models.TextField()
+    locked_by = models.IntegerField()
+    class Meta:
+        db_table = u'video_recording'
+
+class VideoEventRecording(models.Model):
+    id = models.AutoField(primary_key=True)
+    event = models.ForeignKey(Event)
+    recording = models.ForeignKey(VideoRecording)
+    start_time = IntervalField()
+    end_time = IntervalField()
+    event_recording_base_name = models.CharField(max_length=150)
+    class Meta:
+        db_table = u'video_event_recording'
+
+class VideoTargetFormat(models.Model):
+    id = models.AutoField(primary_key=True)
+    target_format_abbr = models.CharField(unique=True, max_length=20)
+    priority = models.IntegerField()
+    container_name = models.CharField(max_length=10)
+    filename_extension = models.CharField(max_length=10)
+    video_width = models.IntegerField()
+    video_height = models.IntegerField()
+    video_codec_name = models.CharField(max_length=20)
+    video_bit_rate = models.IntegerField()
+    audio_sample_rate = models.IntegerField()
+    audio_channel_count = models.IntegerField()
+    audio_codec_name = models.CharField(max_length=20)
+    audio_bit_rate = models.IntegerField()
+    published = models.BooleanField()
+    class Meta:
+        db_table = u'video_target_format'
+
+class VideoTargetFile(models.Model):
+    id = models.AutoField(primary_key=True)
+    event_recording = models.ForeignKey(VideoEventRecording)
+    target_format = models.ForeignKey(VideoTargetFormat)
+    file_status = models.ForeignKey(VideoFileStatus)
+    comments = models.TextField()
+    locked_by = models.IntegerField()
+    generated_time = models.DateTimeField()
+    published_time = models.DateTimeField()
+    class Meta:
+        db_table = u'video_target_file'

Added: package/branches/pycon09/src/debconfvideo/web/pyconvideo/views.py
===================================================================
--- package/branches/pycon09/src/debconfvideo/web/pyconvideo/views.py	                        (rev 0)
+++ package/branches/pycon09/src/debconfvideo/web/pyconvideo/views.py	2009-03-20 05:05:41 UTC (rev 346)
@@ -0,0 +1 @@
+# Create your views here.

Modified: package/branches/pycon09/src/debconfvideo/web/settings.py
===================================================================
--- package/branches/pycon09/src/debconfvideo/web/settings.py	2009-03-20 04:16:22 UTC (rev 345)
+++ package/branches/pycon09/src/debconfvideo/web/settings.py	2009-03-20 05:05:41 UTC (rev 346)
@@ -73,8 +73,10 @@
 )
 
 INSTALLED_APPS = (
+    'django.contrib.admin',
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.sites',
+    'web.pyconvideo',
 )

Modified: package/branches/pycon09/src/debconfvideo/web/urls.py
===================================================================
--- package/branches/pycon09/src/debconfvideo/web/urls.py	2009-03-20 04:16:22 UTC (rev 345)
+++ package/branches/pycon09/src/debconfvideo/web/urls.py	2009-03-20 05:05:41 UTC (rev 346)
@@ -1,8 +1,8 @@
 from django.conf.urls.defaults import *
 
 # Uncomment the next two lines to enable the admin:
-# from django.contrib import admin
-# admin.autodiscover()
+from django.contrib import admin
+admin.autodiscover()
 
 urlpatterns = patterns('',
     # Example:
@@ -13,5 +13,5 @@
     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
 
     # Uncomment the next line to enable the admin:
-    # (r'^admin/(.*)', admin.site.root),
+    (r'^admin/(.*)', admin.site.root),
 )




More information about the Debconf-video-commits mailing list