summaryrefslogtreecommitdiffstats
path: root/packages/views/signoff.py
AgeCommit message (Collapse)AuthorFilesLines
2013-11-07Django 1.6 upgrade, deprecation cleanupDan McGee1-1/+1
PendingDeprecationWarning: commit_on_success is deprecated in favor of atomic. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-09Use 'update_fields' model.save() kwargDan McGee1-1/+1
This was added in Django 1.5 and allows saving only a subset of a model's fields. It makes sense in a few cases to utilize it. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Use content_type and not mimetype on HttpResponse()Dan McGee1-2/+2
Bug #16519 in Django deprecates mimetype, so update our code accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use python set comprehension syntax supported in 2.7Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use Python 2.7 dictionary comprehension syntaxDan McGee1-5/+3
Rather than the old idiom of dict((k, v) for <> in <>). Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-25Replace deprecated direct_to_template() with render() shortcutDan McGee1-3/+2
Now that Django actually provides a concise way to use a RequestContext object without instantiating it, we can use that rather than the old function-based generic view that worked well to do the same. Additionally, these function-based generic views will be gone in Django 1.5, so might as well make the move now. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-25Remove custom utc_now() function, use django.utils.timezone.now()Dan McGee1-2/+2
This was around from the time when we handled timezones sanely and Django did not; now that we are on 1.4 we no longer need our own code to handle this. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-12Use python json module directly in place of simplejsonDan McGee1-4/+3
As of Python 2.6, this is a builtin module that has all the same functions and capabilities of the Django simplejson module. Additionally simplejson is deprecated in the upcoming Django 1.5 release. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-26Bump signoffs and mirror status JSON API versionsDan McGee1-1/+1
Due to datetime formatting changes in Django 1.4, we know follow the ECMA specification more closely and use 'yyyy-mm-ddThh:mm_ssZ' format. As this could break existing users of the JSON data, bump the version. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24Make all datetime objects fully timezone awareDan McGee1-2/+2
This is most of the transition to Django 1.4 `USE_TZ = True`. We need to ensure we don't mix aware and non-aware datetime objects when dealing with datetimes in the code. Add a utc_now() helper method that we can use most places, and ensure there is always a timezone attached when necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-05Adjust page and content caching lengths and decoratorsDan McGee1-2/+0
Remove never_cache from many places now that we don't actually need it since we aren't caching by default. Adjust our cache_function decorator times be shorter values, and also randomize them a bit to make cache invalidations not all line up. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-14Allow population of signoff specs with SVN commit messagesDan McGee1-0/+5
This pulls them from the latest SVN commit on trunk. We don't have a failproof method of getting the exact right commit, but this should be close if it is run on a regular basis via cron (aka hourly). Note that running locally, I needed the development version of South to get the migration included here to apply because of information_schema changes in the current version of MySQL. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-11Add pkgnames array to JSON package signoffs viewDan McGee1-0/+1
This makes it easier to match up exact packages with their signoff entry. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-11packages/views: move signoff-related views into separate moduleDan McGee1-0/+187
Signed-off-by: Dan McGee <dan@archlinux.org>