summaryrefslogtreecommitdiffstats
path: root/main
AgeCommit message (Collapse)AuthorFilesLines
2019-03-17visualize: update d3js to 3.5.0Jelle van der Waa1-1/+1
Update to the latest version 3 release which does not break backwards compatibility yet. Signed-off-by: Jelle van der Waa <jelle@archlinux.org>
2019-03-17templates: Add tag for d3jsJelle van der Waa1-0/+7
Create a simple tag for outputting the d3js <script> html so updating will be easier and the version has be changed in one file. Signed-off-by: Jelle van der Waa <jelle@archlinux.org>
2019-02-18main: remove leftover try/ImportError for Python2/3Jelle van der Waa1-5/+2
2019-02-18main: BigIntegerField fix Python styleJelle van der Waa1-1/+1
2019-02-18sitestatic: Update jQuery and tablesorterJelle van der Waa1-2/+2
2019-02-09Use .decode() instead of str()Felix Yan1-1/+1
2019-02-09Make Package.signature return str key_idFelix Yan2-2/+11
We use the attribute in many places, but it's a "bytes" object in pgpdump that messes up the remaining logic. Let's just wrap it from the very beginning.
2019-02-05Merge pull request #132 from akstrfn/python3jelle van der Waa1-1/+1
Some py3 fixes and some refactoring
2019-02-01remove unecessary list callsAleksandar Trifunovic1-1/+1
2019-01-30Fix a typo in donor_import.pyFelix Yan1-1/+1
2019-01-21Update migrations for Python 3Jelle van der Waa1-15/+15
2019-01-21Fix Python 2 to 3 Unicode issues for string joinFrank Vanderham2-2/+3
Revisited earlier commit where email subject lines with potentially mixed encoding are joined into a single string. This fix brings in the 'codecs' import to decode bytes to string using either the passed encoding (if provided) or otherwise utf-8. Changed the test_donor_import to no longer convert the Header to a string and instead leave it as a byte array.
2019-01-21Fix false positive in test due to changed errorFrank Vanderham1-1/+1
Under Python 3, the error message that is expected to be returned has changed. This fixes the 'expected' error so that the test succeeds and fails as required.
2019-01-21Fix Python 2 vs. Python 3 Unicode string issuesFrank Vanderham1-4/+4
* Fixed issue with string concatenation that fails under Python 3 * Fixed issue with concatenating strings with potentially mixed encoding. All strings are now first converted to UTF-8 and then concatenated.
2019-01-21main: Update __unicode__ to __str__Jelle van der Waa1-5/+5
2019-01-21main: jsmin/cssmin wants a str instead of bytesJelle van der Waa1-1/+1
2019-01-21main: Fix unquote bytes/unicode fuzzJelle van der Waa1-8/+1
2019-01-21main: run 2to3Jelle van der Waa8-20/+20
2019-01-21md5 expects bytes, so encode the stringJelle van der Waa1-1/+1
2018-11-17Fix Foreignkey implicit on_delete on django < 2.0Jelle van der Waa1-1/+1
Foreignkey used to implicitly be on_delete=models.CASCADE and has to be explicit now.
2018-11-17main: signature_exists assignment_tag() is deprecatedJelle van der Waa1-1/+1
Update assignment_tag to simple_tag since the assignment_tag is deprecated.
2018-11-10tests: remove erronous spacesJelle van der Waa1-1/+1
2018-09-25main: Add maildir tests to donor_importJelle van der Waa1-3/+35
Include an integration test, to test donor_import with a real maildir file with a valid and invalid donor.
2018-08-12main: remove unused format_http_headers from utils.pyJelle van der Waa1-9/+0
2018-06-09models.py: correct a typoFelix Yan1-1/+1
2018-04-08main/storage: Switch from Cached to ManifestStaticFilesStorageJohannes Löthberg1-2/+2
Django explicitly recommends against using CachedStaticFilesStorage, partially because it performs worse. It also breaks our tests with our Minified subclassing of it. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2018-04-08cdn: mark jquery <script> as safeJelle van der Waa1-1/+2
Mark jquery script tag as safe otherwise django won't output it as html.
2018-04-08templatetags: use render_html for rendering html tagsJelle van der Waa3-5/+7
2018-03-25main: Add more tests for donor_importJelle van der Waa2-4/+23
Throw a CommandError when the path is not found, similar to what reporead does and add a test for decode_subject.
2018-03-25tests: Extend test coverage for pgp_key_linkJelle van der Waa1-0/+14
Add tests for providing an int/long to pgp_key_link with various sizes: 8, 16 or 40 chars.
2018-03-24tests: Fix 8,20 key_id length testJelle van der Waa1-2/+2
2018-02-18Misc fixes (#84)jelle van der Waa1-4/+0
* 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-02-17Remove unused Iso Model (#82)jelle van der Waa1-15/+0
The ISO model was used for the releng feedback form which was removed earlier. All this code is therefore now unused.
2018-02-17Add donation import management script (#81)jelle van der Waa5-0/+149
This script imports messages from a Maildir folder and creates new unique Donors based on the name in the subject. The subject also contains the amount and the email address, which is not stored by Archweb.
2018-01-29More code refactoring / tests (#79)jelle van der Waa3-37/+29
* 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
2018-01-29Remove old releng feedback form (#80)jelle van der Waa1-165/+0
Remove the old feedback functionality for released iso's. The last submission was in 2012 and it's no longer used by the current released iso's.
2018-01-02Add pagination to JSON package search (#73)release_2018-01-02Johannes Löthberg1-23/+130
* 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-11-16Merge pull request #63 from eli-schwartz/masterrelease_2017-11-16Angel Velásquez1-1/+0
package details: remove category from bugtracker links
2017-11-15Update test to x86_64Jelle van der Waa1-1/+1
2017-10-23package details: remove category from bugtracker linksEli Schwartz1-1/+0
This completely screws up searching for bugs, as you can easily miss any bugs filed to the testing package, and will *always* miss the ones that have been moved to "Upstream Bugs". There is no purpose in restricting the view of bugs filed against a specific package, to some arbitrary subcategory of "why" the bug was filed; all it accomplishes is causing unknowing users to file duplicate bug reports.
2017-08-23Merge pull request #50 from jelly/refactorAngel Velásquez1-2/+1
Refactor and introduce Pylint to travisci
2017-07-22Add a security link to package detailsJelle van der Waa1-0/+4
Show a link for security issues on the package details link.
2017-07-11main.models: remove unused variableJelle van der Waa1-1/+1
2017-07-11main.models: remove unused importJelle van der Waa1-1/+0
2017-06-29Remove CDN configuration optionJelle van der Waa1-8/+2
Remove the unused CDN configuration option for JQuery. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2017-06-12Merge pull request #30 from jelly/signoffsAngel Velásquez1-0/+19
Signoffs
2017-06-11visualize: add testsJelle van der Waa1-0/+25
2017-06-05Add fixtures for the signoff testers groupJelle van der Waa1-0/+19
Add the fixtures corresponding to the signoff testers group on the live server. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2017-05-29main: Add basic tests for pgp template functions (#28)jelle van der Waa1-0/+54
2017-05-29main: Clean up unused option in pgp_fingerprint (#29)jelle van der Waa1-7/+3
The autoescape option is always true in our codebase so remove the unused non escaping option.