~jcsackett/charmworld/bac-tag-constraints

« back to all changes in this revision

Viewing changes to charmworld/models.py

  • Committer: Tarmac
  • Author(s): Abel Deuring
  • Date: 2013-08-07 13:31:20 UTC
  • mfrom: (334.1.5 etags)
  • Revision ID: tarmac-20130807133120-euu4igaar08e89iy
[r=abentley][bug=][author=adeuring] Add an Etag header to the API response for charm details.

Show diffs side-by-side

added added

removed removed

Lines of Context:
263
263
        'subordinate': False,
264
264
        'summary': '',
265
265
 
 
266
        # Provided by update_hash()
 
267
        'hash': None,
 
268
 
266
269
        # Provided by forms used by ~charmers.
267
270
        'is_featured': False,
268
271
    }
662
665
        date = timegm(date.timetuple())
663
666
        return [change for change in self.changes if change['created'] >= date]
664
667
 
 
668
    @property
 
669
    def hash(self):
 
670
        """A sum over the charm's data."""
 
671
        return self._representation['hash']
 
672
 
665
673
 
666
674
class QADataSource:
667
675