summaryrefslogtreecommitdiffstats
path: root/packages
AgeCommit message (Collapse)AuthorFilesLines
2018-05-07Remove calls to order_by() without parametersFrank Vanderham1-1/+1
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.
2018-04-23Fix a typoFelix Yan1-1/+1
2018-04-08packages: Add missing argsJelle van der Waa1-0/+3
Add missing add_argument to parse args.
2018-04-08treewide: context must be a dict rather than ContextJelle van der Waa2-6/+6
Passing Context has been removed in Django 11, a dict should rather be passed.
2018-04-08Update urls.py to non relative importsJelle van der Waa2-6/+5
2018-04-08Change urls.py from patterns to list of url()Johannes Löthberg2-42/+44
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2018-04-08populate_signoffs: NoArgsCommand removed in Django 1.10Jelle van der Waa1-3/+3
Update the code to use BaseCommand instead of the removed NoArgsCommand.
2018-04-08templatetags: use render_html for rendering html tagsJelle van der Waa1-1/+2
2018-02-18Misc fixes (#84)jelle van der Waa1-0/+40
* 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.
2018-01-04Add more basic url tests (#76)jelle van der Waa1-0/+56
* 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
2018-01-04Add opensearch tests (#75)jelle van der Waa1-0/+16
2018-01-02Add pagination to JSON package search (#73)release_2018-01-02Johannes Löthberg2-9/+46
* 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>
2017-12-29packages/test: Fix shadowed test name (#72)Johannes Löthberg1-1/+1
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-11-28Return different dep types under different keys in JSON resultsJohannes Löthberg1-1/+7
* 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>
2017-11-26packages: Add tests for json and normal package searchJelle van der Waa1-0/+88
Test all known scenario's and easy to test search scenario's.
2017-11-15Update differences view for dropping i686Jelle van der Waa2-11/+3
Remove the i686 and x86_64 comparison since i686 is dropped and change the multilib difference to compare against x86_64 instead of i686.
2017-10-18Merge pull request #57 from jelly/small_fixesAngel Velásquez1-4/+1
Make pylint scan all module directory's
2017-09-01packages/admin: Fix the syntax for querysetGiancarlo Razzolini1-2/+2
Django 1.7 changed the method name to get_queryset.
2017-08-28pylint: add deprecated module checkJelle van der Waa1-4/+1
Remove deprecated import of cgi for parse_qs
2017-07-11packages.tests: remove unused importsJelle van der Waa1-1/+0
2017-07-11packages_extra: remove unused variable tagnameJelle van der Waa1-1/+1
2017-06-30packages; dict.has_key is deprecatedJelle van der Waa1-2/+2
2017-06-12Merge pull request #30 from jelly/signoffsAngel Velásquez1-3/+3
Signoffs
2017-06-11tests: add tests for sitemapsJelle van der Waa1-0/+6
2017-06-11tests: test feedJelle van der Waa1-0/+9
2017-06-05Change signoff permissions for Testers groupJelle van der Waa1-3/+3
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>
2017-05-28Make print statements Python 3 compatibleJelle van der Waa1-3/+3
2017-05-24releng: Fix django warningsJelle van der Waa1-0/+19
Fixes warnings for releng.Test.modules and releng.Test.rollback_modules (fields.W340) null has no effect on ManyToManyField.
2017-05-02Remove unused jinja2.pyJelle van der Waa1-71/+0
2016-07-31Add missing migration from ad0bddb209dcdb3704370ce0129babbba54e41b2Angel Velasquez1-0/+20
Signed-off-by: Angel Velasquez <angvp@archlinux.org>
2016-07-31Fix typo in known_bad help textJelle van der Waa1-1/+1
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl> Signed-off-by: Angel Velasquez <angvp@archlinux.org>
2015-06-18Handle Django's level 3 verbosity properlyDan McGee2-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-04-15Fix error in test where HTTP_HOST doesn't existDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-04-15Don't blow up if we can't fetch an SVN revisionDan McGee1-4/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-01-29Ensure packager=unknown query works as expectedDan McGee1-3/+5
I broke this in commit dca00e7aab, whoops! Signed-off-by: Dan McGee <dan@archlinux.org>
2014-12-02Filter maintainer list on packages page by allowed reposDan McGee1-7/+10
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>
2014-11-08Convert some of URL details to Jinja2Dan McGee1-1/+0
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>
2014-10-19Use varied prime numbers for caching lengthsDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-18Merge branch 'jinja'Dan McGee3-92/+81
2014-10-18FS#30773: put exact matches at topDan McGee1-0/+6
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>
2014-10-18Add possible optimization as a TODO for laterDan McGee1-0/+7
2014-10-18Move maintainer/packager link code back into templateDan McGee1-26/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-18Break out Jinja2-specific template helpersDan McGee2-94/+99
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-10-18Convert bulk of package details page to Jinja2Dan McGee1-9/+17
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>
2014-10-18Convert details sub-tempates to Jinja2Dan McGee1-5/+0
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>
2014-09-01Fix up some IP address field issuesDan McGee1-3/+1
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>
2014-09-01More changes for move to Django 1.7Dan McGee1-4/+1
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>
2014-09-01Add auto-generated migrations from new Django migrations frameworkDan McGee1-0/+205
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01Remove old south migrationsDan McGee25-4561/+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>
2014-01-25Add 'Latest Update' column to stale package relationsDan McGee2-4/+8
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>