Age | Commit message (Collapse) | Author | Files | Lines |
|
Calls to order_by() without passing any parameters was causing
UnorderedObjectListWarning during unit tests. The failing unit tests
were testing the sitemap functionality. Sitemaps utilize Paginators,
which require either the entity ordering as specified in their Meta
object, or a specific ordering in the QuerySet, otherwise this warning
is issued.
|
|
|
|
Add missing add_argument to parse args.
|
|
Passing Context has been removed in Django 11, a dict should rather be
passed.
|
|
|
|
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
|
|
Update the code to use BaseCommand instead of the removed NoArgsCommand.
|
|
|
|
* Update coveragerc to exclude newly located tests
There are now tests under main/tests/* etc, which should be omitted for
coverage.
* omit settings from coverage
settings and local_settings aren't interesting for coverage, omit them.
* remove leftover secure context processor
The secure context processor was used to determine if the cdn served
assets should be loaded over https or http. Since assets are no longer
served with a cdn and the whole site is loaded over https these days,
this code is dead and can be removed.
* packages: Add test for flagging packages out of date
Add simple test cases for flagging packages out of date, should later be
improved to query the Package model for packages and use that data
instead of hardcoding.
|
|
* packages: Add test for differences view
Add a simple test to check if the differences view renders.
* packages: Add tests for more urls
Add basic tests for /packages/ related urls.
* mirrors: Add mirrorlist urls
|
|
|
|
* Add pagination to JSON search form using Paginator
The downside of this is that we can't easily run prefetch_related
anymore, but given the limit I don't suspect this to be a problem.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* packages/views/search: Add appropriate newlines to search_json
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Update package fixture to be the same as devel/fixtures/core.db.tar.gz
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* packages/tests: Add tests for JSON search pagination
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
|
|
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
|
|
* Return different dep types under different keys in JSON results
* packages/utils: Put dependency type list above class
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
|
|
Test all known scenario's and easy to test search scenario's.
|
|
Remove the i686 and x86_64 comparison since i686 is dropped and change
the multilib difference to compare against x86_64 instead of i686.
|
|
Make pylint scan all module directory's
|
|
Django 1.7 changed the method name to get_queryset.
|
|
Remove deprecated import of cgi for parse_qs
|
|
|
|
|
|
|
|
Signoffs
|
|
|
|
|
|
Change the permissions required for a signoff, so that the testers group
does not need change_package permission
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
|
|
|
|
Fixes warnings for releng.Test.modules and releng.Test.rollback_modules
(fields.W340) null has no effect on ManyToManyField.
|
|
|
|
Signed-off-by: Angel Velasquez <angvp@archlinux.org>
|
|
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
Signed-off-by: Angel Velasquez <angvp@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>
|
|
I broke this in commit dca00e7aab, whoops!
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We do this elsewhere on the master keys page, so do the same thing here.
Noticed-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Anytime we have a loop with >100 items, the Django template engine
begins to be the bottleneck. This one is relatively straightforward to
convert, and sets the stage for converting the mirror status page as
well.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
|
|
There have been a few proposed solutions to this, but there really isn't
anything without a drawback. Things break pagination, require loading
the entire result set from the database, etc.
Just plop a new table on the page if someone did a so-called "simple"
search and we have a match. Only show on the first page of the search
results. This results in a relatively fast experience for someone doing
something like searching for the "perl" package.
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 wrap the whole thing in a Django template so we don't have to convert
our base template to Jinja2 (or have one for each templating engine).
This also simplifies the static stuff so we can just keep using the
Django tags.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is a start at improving performance of rendering the package
details page, our most-visited and slowest page on the production
website. The Django template system is not very efficient due to our
heavy use of broken out templates and pulling of various attributes and
such on related packages.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Ensure we always coerce values to unicode in our __unicode__ method, and
remove some now unneeded verbosity and comments since the upstream bug
has been fixed.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
The removal of the root `__init__.py` file is so the testing framework
does consistent imports of our models now that the loading strategy has
changed.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
This helps when doing the irregular cleanup of these things and making
sure a relation has been stale for some time and not just a couple
minutes or hours.
Signed-off-by: Dan McGee <dan@archlinux.org>
|