Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We're not using any of the injected values these context processors
provide in our templates, so remove them from our default config.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is the preferred and non-deprecated way of doing this in Django
1.4+.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
See https://docs.djangoproject.com/en/1.4/ref/clickjacking/ for details.
This middleware was added to the default configuration in Django 1.4.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Since we need these in the template for any details links, we might as
well pull them back from the database in one query rather than three.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Django doesn't attach the parent object to the child objects, even when
queried through the related manager. This causes up to 3 extra queries:
one to retrieve the package again, and one each for arch and repo
retrieval.
For a package like archboot, this drops the number of necessary queries
for the package page from 805 to 222 (yes, this is still too high) and
cuts the time spent waiting on the database from 505ms to 262ms.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is ripped off from commit 7c92ddbd3c86d when we added slugs to
News objects.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Instead of having multiple methods, move this into our single 'created'
setter method. If the 'last_modified' property is present, we now update
it accordingly when saving any model with this signal attached.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
For todolist packages that have had their package removed, this will
allow the package name to continue to appear even after the linked
package has been deleted.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
As of commit 724422850020f, these are specified as data URLs directly in
the CSS. They were kept around for a short time for caching reasons; by
the time this commit gets deployed we should be fine.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Commit 4c69911982 had an inadvertent side effect here; we need to
explicitly disable ordering for the annotate() to work correctly.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Some of the base CSS styles were a bit too specific, causing certain
overrides to not take effect. Loosen the specifications a bit so styles
are easier to override.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
These are super-simple, but it is also trivial to test.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
When running tests, we can find old migrations that didn't use datetime
objects with timezones attached.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Remove some of the smarts and do less, but be better about properly
sorting the items as one might expect.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
If one of them breaks, we don't want to prevent the rest of the on-load
events from firing. This is currently a problem on some browsers with
the versions of jQuery and tablesorter we are using.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Fix some that referenced non-existent attributes, and add the attribute
to other models.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
For package signatures, it turns out it is way cheaper to just parse the
signature again rather than going though all the decorator and
cache_function_key business. This speeds up the mismatched signatures
report significantly once this is removed.
For base_package, given that we only call it once from our package
details template, it makes little sense to cache the result.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Apparently clients don't like urlencoded values in the magnet link, so
%3A isn't treated the same as ':'.
Signed-off-by: Dan McGee <dan@archlinux.org>
|