Changeset 96ab603


Ignore:
Timestamp:
11/02/2010 14:35:05 (4 years ago)
Author:
olivier <>
Branches:
master, crem, crem2, dev, dev2, diadems, feature/breadcrumbs, feature/ts-0.5, feature/ts-0.5.4, feature/writecache, forma, generic, instru_search, lam, lam2, mapsv3, merge, nlivemulti, production, release/1.4.4, sabiod, security, server, social, storage, telecaster, test, video
Children:
5bf08b0
Parents:
12d665f
git-author:
olivier <> (11/02/2010 14:35:05)
git-committer:
olivier <> (11/02/2010 14:35:05)
Message:

fix compatibility with Django 1.1.1 (tested with debian lenny backport python-django 1.1.1-1~bpo50+1)

Location:
telemeta
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • telemeta/models/core.py

    r12d665f r96ab603  
    175175        return self.to_python(value) 
    176176 
    177     def get_db_prep_value(self, value, connection, prepared=False): 
     177    def get_db_prep_value(self, value, connection=None, prepared=False): 
    178178        # Casts times into the format expected by the backend 
    179179        return value.as_seconds() 
     
    333333        return required 
    334334 
    335     def save(self, force_insert=False, force_update=False, using=None): 
     335    def save(self, force_insert=False, force_update=False): 
    336336        required = self.required_fields() 
    337337        for field in required: 
    338338            if not getattr(self, field.name): 
    339339                raise RequiredFieldError(self, field) 
    340         super(ModelCore, self).save(force_insert, force_update, using) 
     340        super(ModelCore, self).save(force_insert, force_update) 
    341341 
    342342    @classmethod 
  • telemeta/models/media.py

    r622588f r96ab603  
    5555    public_access_label.verbose_name = _('public access') 
    5656 
    57     def save_with_revision(self, user, force_insert=False, force_update=False, using=None): 
     57    def save_with_revision(self, user, force_insert=False, force_update=False): 
    5858        "Save a media object and add a revision" 
    59         self.save(force_insert, force_update, using) 
     59        self.save(force_insert, force_update) 
    6060        Revision.touch(self, user)     
    6161 
     
    193193        return False 
    194194 
    195     def save(self, force_insert=False, force_update=False, using=None): 
     195    def save(self, force_insert=False, force_update=False): 
    196196        if not self.code: 
    197197            raise RequiredFieldError(self, self._meta.get_field('code')) 
    198198        if not self.is_valid_code(self.code): 
    199199            raise MediaInvalidCodeError("%s is not a valid code for this collection" % self.code) 
    200         super(MediaCollection, self).save(force_insert, force_update, using) 
     200        super(MediaCollection, self).save(force_insert, force_update) 
    201201 
    202202    class Meta(MetaCore): 
     
    274274        return False 
    275275 
    276     def save(self, force_insert=False, force_update=False, using=None): 
     276    def save(self, force_insert=False, force_update=False): 
    277277        if not self.code: 
    278278            raise RequiredFieldError(self, self._meta.get_field('code')) 
     
    280280            raise MediaInvalidCodeError("%s is not a valid item code for collection %s"  
    281281                                        % (self.code, self.collection.code)) 
    282         super(MediaItem, self).save(force_insert, force_update, using) 
     282        super(MediaItem, self).save(force_insert, force_update) 
    283283 
    284284    def computed_duration(self): 
  • telemeta/templates/telemeta_default/inc/mediaitem_list.html

    red3547b r96ab603  
    3535    {% if item.recorded_from_date %} 
    3636        {{ item.recorded_from_date.year }} 
    37         {% if item.recorded_to_date and item.recorded_to_date.year != item.recorded_from_date.year %} 
     37        {% if item.recorded_to_date and not item.recorded_to_date.year|equals:item.recorded_from_date.year %} 
    3838            - {{ item.recorded_to_date.year }} 
    3939        {% endif %} 
  • telemeta/templatetags/telemeta_utils.py

    r619d1a8 r96ab603  
    206206def variable_link(object, url_name, url_key): 
    207207    return reverse(url_name, args=[field_value(object, url_key)]) 
     208 
     209@register.filter 
     210def equals(value1, value2): 
     211    return value1 == value2 
Note: See TracChangeset for help on using the changeset viewer.