summaryrefslogtreecommitdiff
path: root/todolists
AgeCommit message (Collapse)Author
2012-12-28Use todolist slugs for all URLsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Populate the todolist slug field and mark non-nullDan McGee
This is ripped off from commit 7c92ddbd3c86d when we added slugs to News objects. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add todolists slug fieldDan McGee
This will be used to make more descriptive URLs for our todolists. The `null=True` bit will be removed once a data migration is added to add slugs to all previously created todolists. 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-12-28Add data migration for todolistsDan McGee
This moves the data from the old models into the new ones. Note that IDs are not preserved across the move, but we do store the old ID in the old_id column so we don't break every link out there. Links will become slugs in a future commit, so there should be no ambiguity when linking via number vs string. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add packages method to new Todolist modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add todolist admin for new modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add new todolists and todolist package modelDan McGee
Move the todolist model from main to the todolists application, and make a few minor tweaks to field names along the way. Also add a 'raw' field that will hold the originally input text data from the creator or last modifier of the todolist. Add pkgname, pkgbase, arch, and repo fields to a new todolist package model, which will supplement the former foreign key to an actual package object. This will prevent todolist package objects from ever being deleted as they can be now, which is not intuitive. Also change the current boolean 'complete' flag to a 'status' enum that can hold other values. For now, we add 'In-progress' to the mix. Finally, add a 'user' field, and a 'comments' field that will be utilized later by the UI. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Add initial todolists models migrationDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-20Improve performance of todolists queryDan McGee
Use some standard SQL and split the query into two different parts to save a lot of unnecessary sorting and field retrieval at the database level. The `CASE WHEN complete THEN 1 ELSE 0 END` syntax should be accepted by any database that implements proper SQL; it was tested in PostgreSQL and sqlite3 without issues. 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-04-27Incomplete-only todolists optimizationDan McGee
We can push this down to the database if we know in advance we only need the incomplete lists. This helps our call on the developer dashboard quite a bit; the time of the single query in question drops from >1300ms to around 40ms. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Prevent selection of many useless fields when getting todolistsDan McGee
This is a bit of a hack, but makes the resulting resultset returned from the database a lot smaller and kills off all the columns we don't care about and would never look at. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23Change Django urls.py importDan McGee
Until Django 1.3, the functions include(), patterns() and url() plus handler404, handler500 were located in a django.conf.urls.defaults module. In Django 1.4, they live in django.conf.urls. 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-12-13Move more URLs out of root urlconfDan McGee
Things are a bit cleaner now. 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>
2010-06-28Mark the todolists' flag view as never_cacheEvangelos Foutras
Also remove the @vary_on_headers('X-Requested-With') since it's irrelevant now. Dan: remove now unnecessary import. Signed-off-by: Evangelos Foutras <foutrelis@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-24Mark a few more pages as never cacherelease_2010-06-24Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-22Add 'never_cache' decorator in a bunch of placesDan McGee
Now that we cache everything, we need to ensure anyone doing edits and such gets the live data and not some cached version that was already updated and is now stale. Add the never_cache decorator to any of the CUD screens as well as a few others that might benefit from always being regenerated. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-08Use Sites framework instead of hardcoded domain nameDan McGee
Instead of putting 'www.archlinux.org' all over the place, use the Django sites framework to pull the site name out of the database. Now these amazing things will work if you are running locally and decide to change the site! Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-02Rename todolist email templateDan McGee
More in line with our other templates that have .txt extensions. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-21Fix undefined variable issueDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-02Fix package URL in todo list emailsDan McGee
Fixes FS#18935. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-29Fix todolist dealing with package maintainersDan McGee
Forgot to update this, whoops. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Use repo.testing flag instead of test-based checksDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-01Unify spelling of 'Todo'Dan McGee
We used 'Todo', 'ToDo', and 'To-do' in different places. Unify them all to the first. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27Ensure our cache is correct with AJAX requestsDan McGee
Since the same URLs serve two different responses based on the request being AJAX or not, we want to ensure we don't cache the wrong one and serve it up incorrectly. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-26Implement AJAX flagging for todo itemsEvangelos Foutras
[Some trailing whitespace got killed in the process. :3] Dan: I made a few small changes including moving the jQuery include down above the other script block; since it is not needed right away it can be loaded later in the page. Signed-off-by: Evangelos Foutras <foutrelis@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-10Remove archweb prefix from all importsDan McGee
Unnecessary, and lets us standardize on not using it everywhere. Signed-off-by: Dan McGee <dan@archlinux.org>