]> git.parisson.com Git - telemeta.git/commitdiff
Merge branch 'crem' into crem2
authoryomguy <yomguy@parisson.com>
Wed, 13 Mar 2013 14:26:16 +0000 (15:26 +0100)
committeryomguy <yomguy@parisson.com>
Wed, 13 Mar 2013 14:26:16 +0000 (15:26 +0100)
Conflicts:
telemeta/models/media.py
telemeta/views/core.py

1  2 
setup.py
telemeta/models/media.py
telemeta/templates/telemeta/collection_detail.html
telemeta/templates/telemeta/mediaitem_detail.html
telemeta/views/core.py
telemeta/views/home.py
telemeta/views/item.py

diff --cc setup.py
Simple merge
index 70e7a11586b9f0ac8c995ebbf9a7256177935d8a,817c44587e118c2b84be9bb1b2a191c999a785a1..3a6c62a782c2b7411d8ec4c304a2631e4a50e474
@@@ -58,12 -60,12 +60,13 @@@ collection_unpublished_code_regex = 'CN
  collection_code_regex             = '(?:%s|%s)' % (collection_published_code_regex,
                                                      collection_unpublished_code_regex)
  
- item_published_code_regex    = '[A-Za-z0-9._-]*'
- item_unpublished_code_regex  = '[A-Za-z0-9._-]*'
+ # 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_code_regex              = '(?:%s|%s)' % (item_published_code_regex, item_unpublished_code_regex)
  
 -PUBLIC_ACCESS_CHOICES = (('none', 'none'), ('metadata', 'metadata'), ('full', 'full'))
 +PUBLIC_ACCESS_CHOICES = (('none', _('none')), ('metadata', _('metadata')),
 +                         ('mixed', _('mixed')), ('full', _('full')))
  
  ITEM_TRANSODING_STATUS = ((0, _('broken')), (1, _('pending')), (2, _('processing')),
                           (3, _('done')), (5, _('ready')))
@@@ -386,8 -388,6 +389,8 @@@ class MediaItem(MediaResource)
      external_references   = TextField(_('published references'))
      copied_from_item      = WeakForeignKey('self', related_name="copies",
                                             verbose_name=_('copy of'))
-     mimetype              = CharField(_('mime type'), max_length=255, blank=True) 
++    mimetype              = CharField(_('mime type'), max_length=255, blank=True)
 +    auto_period_access    = BooleanField(_('automatic access after a rolling period'), default=True)
  
      # Media
      file                  = FileField(_('file'), upload_to='items/%Y/%m/%d',
index 561dd5e7b120d2016b13f9746040b67652f6ee92,e3a7b7454e77c4c4e4811f2aa45423794c8937df..46b1c5462b5bb3f09d1cee57984fc007e14b9ed3
@@@ -102,16 -102,6 +102,19 @@@ def send_file(request, filename, conten
      response['Content-Length'] = os.path.getsize(filename)
      return response
  
++<<<<<<< HEAD
 +def nginx_media_accel(request, filename):
 +    """Send a protected medie file through nginx with X-Accel-Redirect"""
 +
 +    response = HttpResponse()
 +    url = settings.MEDIA_URL + filename
 +    # let nginx determine the correct content type
 +    response['Content-Type'] = ""
 +    response['X-Accel-Redirect'] = url
 +    return response
 +
++=======
++>>>>>>> crem
  def render(request, template, data = None, mimetype = None):
      return render_to_response(template, data, context_instance=RequestContext(request),
                                mimetype=mimetype)
Simple merge
Simple merge