]> git.parisson.com Git - telemeta.git/commitdiff
cleanup
authoryomguy <yomguy@parisson.com>
Tue, 29 Nov 2011 09:03:31 +0000 (10:03 +0100)
committeryomguy <yomguy@parisson.com>
Tue, 29 Nov 2011 09:03:31 +0000 (10:03 +0100)
telemeta/models/media.py

index 5ce5d17e1fce9da26656cd11dbd22d0900bb4e48..5c272d9262f46b92e30f73d9e6101c20600cf521 100644 (file)
@@ -61,6 +61,7 @@ item_published_code_regex    = '[A-Za-z0-9._-]*'
 item_unpublished_code_regex  = '[A-Za-z0-9._-]*'
 item_code_regex              = '(?:%s|%s)' % (item_published_code_regex, item_unpublished_code_regex)
 
+PUBLIC_ACCESS_CHOICES = (('none', 'none'), ('metadata', 'metadata'), ('full', 'full'))
 
 class MediaResource(ModelCore):
     "Base class of all media objects"
@@ -89,7 +90,6 @@ class MediaCorpus(MediaResource):
     "Describe a corpus of collections"
     
     element_type = 'corpus'
-    PUBLIC_ACCESS_CHOICES = (('none', 'none'), ('metadata', 'metadata'), ('full', 'full'))
 
     # General informations
     reference             = CharField(_('reference'), unique=True, null=True)
@@ -137,8 +137,8 @@ class MediaCorpusCollectionRelation(ModelCore):
                                                         
 class MediaCollection(MediaResource):
     "Describe a collection of items"
+    
     element_type = 'collection'
-    PUBLIC_ACCESS_CHOICES = (('none', 'none'), ('metadata', 'metadata'), ('full', 'full'))
 
     def is_valid_collection_code(value):
         "Check if the collection code is well formed"
@@ -278,8 +278,8 @@ class MediaCollectionForm(ModelForm):
 
 class MediaItem(MediaResource):
     "Describe an item"
+    
     element_type = 'item'
-    PUBLIC_ACCESS_CHOICES = (('none', 'none'), ('metadata', 'metadata'), ('full', 'full'))
     
     # Main Informations
     title                 = CharField(_('title'))