]> git.parisson.com Git - telemeta.git/commitdiff
allow all aphanum codes fir collections and items (NOT for CREM !!)
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 14 Oct 2013 23:11:43 +0000 (01:11 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 14 Oct 2013 23:11:43 +0000 (01:11 +0200)
telemeta/models/media.py

index fa19564517e85fee15d0b5e9eab09c09701990b8..fc76b24403ee0dd6165ffbead3309d0846b55a4d 100644 (file)
@@ -54,15 +54,13 @@ from telemeta.util.kdenlive.session import *
 from django.db import models
 
 
-# Special code regex of collections for the branch
-collection_published_code_regex   = 'CNRSMH_E_[0-9]{4}(?:_[0-9]{3}){2}'
-collection_unpublished_code_regex = 'CNRSMH_I_[0-9]{4}_[0-9]{3}'
+collection_published_code_regex   = '[A-Za-z0-9._-]*'
+collection_unpublished_code_regex = '[A-Za-z0-9._-]*'
 collection_code_regex             = '(?:%s|%s)' % (collection_published_code_regex,
                                                     collection_unpublished_code_regex)
 
-# Special code regex of items for the branch
-item_published_code_regex    = collection_published_code_regex + '(?:_[0-9]{2,3}){1,2}'
-item_unpublished_code_regex  = collection_unpublished_code_regex + '_[0-9]{2,3}(?:_[0-9]{2,3}){0,2}'
+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')),