From b5f51a5f24ca7db17fa6568ac1ad07f482629720 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 15 Oct 2013 01:11:43 +0200 Subject: [PATCH] allow all aphanum codes fir collections and items (NOT for CREM !!) --- telemeta/models/media.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/telemeta/models/media.py b/telemeta/models/media.py index fa195645..fc76b244 100644 --- a/telemeta/models/media.py +++ b/telemeta/models/media.py @@ -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')), -- 2.39.5