summaryrefslogtreecommitdiffstats
path: root/todolists
AgeCommit message (Collapse)AuthorFilesLines
2019-01-21Update migrations for Python 3Jelle van der Waa1-2/+2
2019-01-21Refactor Python 3 __unicode__ to __str__Frank Vanderham1-2/+2
In Python 3 for Django, class method __unicode__ must be changed to __str__. This commit replaces all models that use __unicode__ to __str__.
2019-01-21todolists: tests: convert response.content to strJelle van der Waa1-2/+2
Network data is usually a bytes object while the todolist.name is a str.
2019-01-21main: run 2to3Jelle van der Waa1-1/+1
2019-01-21Remove all squashed migrationsJelle van der Waa3-82/+0
this makes it easier to upgrade to Python 3 since less on_delete lines have to be fixed.
2018-11-17Squash all migrationsJelle van der Waa1-0/+68
2018-11-17todolists: add missing migration for old_idJelle van der Waa1-0/+19
2018-11-17Fix Foreignkey implicit on_delete on django < 2.0Jelle van der Waa1-3/+3
Foreignkey used to implicitly be on_delete=models.CASCADE and has to be explicit now.
2018-10-02todolists: remove old_id from todolist modelJelle van der Waa3-10/+1
Old todolist items contained an old_id to keep links working, these items where most recenlty created 6 years ago. Since old todolists of a long time ago aren't particularly interesting they will be removed. Closes #141
2018-08-12todolists: test delete/edit/addJelle van der Waa1-1/+69
2018-08-11todolists: Remove unused ModelManagerJelle van der Waa1-11/+0
2018-08-11todolists: sort todolist on incomplete statusJelle van der Waa1-1/+2
2018-07-06todolists: Add json endpoint for todo detail viewJelle van der Waa3-2/+28
Add a /todo/$name/json endpoint which returns the json for a todo list item.
2018-04-08treewide: context must be a dict rather than ContextJelle van der Waa1-3/+3
Passing Context has been removed in Django 11, a dict should rather be passed.
2018-04-08todolists/models: non-relational field given for 'username'Jelle van der Waa1-1/+1
Use user__userprofile instead of user__username for filter.
2018-04-08Change urls.py from patterns to list of url()Johannes Löthberg1-11/+11
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2018-04-08templatetags: use render_html for rendering html tagsJelle van der Waa1-1/+2
2018-03-25todolists: Add test for overview and detail pageJelle van der Waa1-0/+29
2018-03-25todolists: Add test for templatetagsJelle van der Waa1-0/+29
Test a simple case of the todolist_details_link template tag
2018-03-25todolists: Add missing __init__.py in testsJelle van der Waa1-0/+0
Without it, the tests won't be picked up.
2018-01-29More code refactoring / tests (#79)jelle van der Waa1-0/+45
* main: move tests to main/tests Move the templatetags tests to main/tests/test_templatetags. * main: Add test for templatetags country Create a test for the templatetag country_flag. * main: remove duplicate floatvalue floatvalue is only used in the mirrors templates and the same exact function exists in the mirror_status templatetags. * main: Remove duplicate hours filter The hours filter is also defined in the mirror_status and only used in mirrors. * main: move percentage filter to mirrors Move the percentage filter to the only user of it and add a test for basic use cases. * main: remove duplicate duration implementation The duration templatetag filter is also defined in mirror_status.py * templates: remove unrequired import flags * main: Add missing testcase for country_flag Add the None test case, so that the function is fully covered. * todolists: create tests for Todolist model Add basic tests for the Todolist model
2015-06-05Tweak display of todolist descriptionsDan McGee1-0/+4
Indent, call out, and add some borders, among other things. Signed-off-by: Dan McGee <dan@archlinux.org>
2015-02-03Sort packages correctly in the todolist notification emailsDan McGee1-1/+3
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 McGee2-8/+11
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-18Change case of SUM() SQL functionDan McGee1-1/+1
2014-09-01Add auto-generated migrations from new Django migrations frameworkDan McGee1-0/+61
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01Remove old south migrationsDan McGee9-1108/+0
Django 1.7 has built-in migrations support, so we no longer want these around. All existing installs should be fully migrated at this point to the latest schema. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-11-06Django 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-05-10Add a 'last touched by' column to todolist detail viewDan McGee2-3/+5
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-16Various minor code cleanups and fixesrelease_2013-04-16Dan McGee2-2/+0
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 McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-11Make todolists fully publicDan McGee1-3/+3
Remove the login_required decorator from the index and detail views to allow everyone to see the same thing. Of course, when I say "same" here, unauthenticated users don't see the same links developers do to mark packages complete and incomplete. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-11Remove public todolists viewDan McGee1-10/+0
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 McGee1-6/+19
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 McGee1-1/+1
Conflicts: requirements.txt requirements_prod.txt
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-02-08Ensure todolists are consistently sortedDan McGee1-1/+2
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 McGee2-1/+21
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-15Clean up and make several migrations modernrelease_2013-01-15Dan McGee1-0/+4
This moves most migrations to the v2 format that have been presenting some issues. One missing depends_on relationship has been added, and we allow an index to not be dropped if it does not exist due to the shittyness in sqlite3 actually keeping indexes across DDL on that table. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Use content_type and not mimetype on HttpResponse()Dan McGee1-3/+2
Bug #16519 in Django deprecates mimetype, so update our code accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12Add last_modified field to todolist packagesDan McGee3-1/+253
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Set user on todolist packages when flag status changesDan McGee1-0/+1
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 McGee3-22/+37
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-31Fix list_pkgbases view callDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Fix dependency issue found by south migrationcheck commandDan McGee1-0/+1
Due to pgp_signature being added to the Package model, we need to depend on this later change as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Minor coding style tweaksDan McGee2-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Add 'removed' field to todolist packagesDan McGee2-1/+128
This will be utilized to soft-delete items from the list if the packages are modified, rather than deleting them outright. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Small admin tweaks for todolists filteringDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-29Defer the 'raw' field when listing todolistsDan McGee2-2/+2
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-28Add a todolist package details link template tagDan McGee2-0/+19
Given the way we retrieve certain related objects, it makes more sense to use a custom tag here rather than our generic package details link tag. When viewing a large todolist, this saves significantly on the number of queries we need to build the page. Signed-off-by: Dan McGee <dan@archlinux.org>