summaryrefslogtreecommitdiff
path: root/todolists/views.py
AgeCommit message (Collapse)Author
2015-04-16Merge tag 'release_2015-04-13' into archweb-genericLuke Shumaker
Fix up 'None' display in places
2015-04-15Merge tag 'release_2014-11-08.2' into archweb-genericLuke Shumaker
Todolist pagination and sitemap, news sitemap
2015-02-03Sort packages correctly in the todolist notification emailsDan McGee
Just using sorted() here is bogus without a key function; the default sort order is by the return value from id() in Python since we have no __lt__ definition on the Package model. Add an explicit sort key. Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-08Paginate the todolist listing pageDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-11-28Merge tag 'release_2013-11-25' into archweb-genericLuke Shumaker
Django 1.6 upgrade and other changes Conflicts: templates/news/list.html templates/public/index.html
2013-11-06Django 1.6 upgrade, deprecation cleanupDan McGee
PendingDeprecationWarning: commit_on_success is deprecated in favor of atomic. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-06-23Merge branch 'archweb' into archweb-generic2Luke Shumaker
2013-05-10Add a 'last touched by' column to todolist detail viewDan McGee
This allows you to see very easily who last manipulated a package todolist item in case you have a need to know. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-21Merge branch 'archweb' into archweb-generic2Luke Shumaker
2013-04-21Merge branch 'archweb' into archweb-generic2Luke Shumaker
Conflicts: devel/views.py feeds.py public/views.py settings.py sitestatic/archweb.js templates/base.html templates/devel/profile.html templates/mirrors/status.html templates/news/view.html templates/packages/flaghelp.html templates/packages/opensearch.xml templates/public/download.html templates/public/feeds.html templates/public/index.html templates/registration/login.html templates/releng/results.html templates/todolists/public_list.html
2013-04-20todolist/views.py: use settings.BRANDING_EMAILLuke Shumaker
2013-04-16Various minor code cleanups and fixesrelease_2013-04-16Dan McGee
Most of these were suggested by PyCharm, and include everything from little syntax issues and other bad smells to dead or bad code. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-11Only show incomplete todolists to unauthenticated usersrelease_2013-03-11Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-11Remove public todolists viewDan McGee
Replace this with a redirect to the developer todolist index page. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-07Fix IntegrityError in corner case todolist updateDan McGee
We were seeing this in production: IntegrityError: duplicate key value violates unique constraint "todolists_todolistpackage_todolist_id_700d1b623414814c_uniq" DETAIL: Key (todolist_id, pkgname, arch_id)=(206, ruby-cairo, 2) already exists. This is due to a corner case where a package was originally on a todolist and the underlying package object disappeared, so the todolist entry was unlinked and pkg_id set to NULL. Later, this package came back, but our get_or_create tried to create an object that violated our unique constraint because of the missing pkg_id. Call get_or_create with the minimum necessary bits to find the todolist package object, and pass the rest of the values via defaults to avoid this problem. Additionally, relink any todolist entries up to a package in the repositories if one is available. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-26Merge branch 'django-1.5'Dan McGee
Conflicts: requirements.txt requirements_prod.txt
2013-02-09Use 'update_fields' model.save() kwargDan McGee
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-02-08Ensure todolists are consistently sortedDan McGee
This is for the public view page; we had no order_by() call so lists could be displayed in seemingly random order. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-22Show staging version on todolist view pageDan McGee
If one exists, it is easy enough to show it here so in-progress todolists can easily be cross-checked with the current state of the repository. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Use content_type and not mimetype on HttpResponse()Dan McGee
Bug #16519 in Django deprecates mimetype, so update our code accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Set user on todolist packages when flag status changesDan McGee
This will allow us to see who last changed the status of a todolist item. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Mark todolist packages as removed rather than deleting themDan McGee
This makes it easier to see the progression of a todolist and its contents easier since we are no longer losing the data. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Minor coding style tweaksDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-29Defer the 'raw' field when listing todolistsDan McGee
A lot like skipping fetching of the news content; we definitely don't need this just to list the todolists on index pages. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Set slug on todolist creationDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Use todolist slugs for all URLsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Todolist URLs map to old_id now, not idDan McGee
This is a short-term fix before adding a slug field to todo lists as we did to news a while back. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Convert to using new todolist models everywhereDan McGee
This is a rather widespread set of changes converting usage to the new todo list and todo list package model recently introduced. The data migration is not included in this commit. After this commit, the old model should no longer be referenced anywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use python set comprehension syntax supported in 2.7Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-25Add arch and repo filter to todolist packagesDan McGee
This matches what we do on signoffs. Also beef up the styling a bit and add the dynamically updated package count info. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24Replace deprecated direct_to_template() with render() shortcutDan McGee
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-23Add blank description to todo list creation and editingDan McGee
This is a field shown on the general_form.html, and shows up as @@@INVALID@@@ in development environments. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-12Use python json module directly in place of simplejsonDan McGee
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-05-02Ensure order_by default value is cleared when using distinct()Dan McGee
Otherwise the queryset returns nonsensical results. I find the design of this less than obvious but so be it; we can ensure the results work regardless of a default ordering on the model. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-05Adjust page and content caching lengths and decoratorsDan McGee
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>
2012-01-04Add new todolist pkgbase list viewDan McGee
This is for use after rebuilds when moving packages out of the staging and testing repositories. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03Make maintainer lookup on todo lists fastDan McGee
This is rather sick to look at. Sorry, Django gives me no other choice. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-23Don't include staging packages in todolistsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-04Fix missed list -> todolist variable renamerelease_2011-05-04Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-09Show more info about todolists on developer dashboardrelease_2011-04-09Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-09Rename local variables for clarityDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07Convert todolist delete to class-based viewDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-04Send only one email per todolistrelease_2011-03-07Dan McGee
Customize each email on a per-maintainer basis and list all the relevant packages inside, rather than spamming people. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-04Use transactions in todolist creationDan McGee
So we do all of the work at once and don't let things leak out before the list is completely added or updated. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-03Correct some permission decoratorsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-04Todo list minor fixes and comments for laterDan McGee
When we show the edit todo list page, use a sorted list retrieved straight from the database instead of a unordered set() we create at the application level. Also add some comments for potential later improvements on transaction boundaries and async emailing. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-09Improve todo list view pageDan McGee
Add total package count and incomplete package count columns. Also reduce the number of total queries by killing the query per row that was happening before. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-03Use direct_to_template in all remaining possible placesDan McGee
Rather than the need to include RequestContext() calls directly, we can just use direct_to_template to do all the work for us. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-25Add a basic view for todo listsDusty Phillips
Dan: rename template and view to something a bit more concise. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-05Add absolute URL method for todo listsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>