aboutsummaryrefslogtreecommitdiffstats
path: root/manage.py (unfollow)
Commit message (Collapse)AuthorLines
2020-07-30Provide callable, not return value.Gravatar Leon Sandøy-1/+1
Co-authored-by: Sebastiaan Zeeff <[email protected]>
2020-07-29Add a constraint in the DB model as well.Gravatar Leon Sandøy-0/+15
This really should've been handled automatically by DRF, and in the future, it will be. But for now, we need to have constraints both on the serializer (to get status code 400), and on the model (to prevent direct database constraint violations). See https://github.com/encode/django-rest-framework/issues/7173
2020-07-29Fix multiple leafs for migration graph.Gravatar Leon Sandøy-1/+1
2020-07-29Add a test for checking duplicates.Gravatar Leon Sandøy-0/+5
2020-07-29Handle unique validator in DRF, not Django.Gravatar Leon Sandøy-15/+15
I was handling this in a Django vanilla kind of way, which was causing the constraint to return a 500 instead of a 400. This changes the approach to use the DRF way, and makes it return 400. It doesn't actually change the way anything behaves, other than returning the right status code.
2020-07-27Rename AllowDenyList to FilterListGravatar Leon Sandøy-48/+47
2020-07-19Minor changes to tests, use subTest.Gravatar Leon Sandøy-9/+4
2020-07-19Document the get_types endpoint.Gravatar Leon Sandøy-0/+14
2020-07-19Relock with a newer version of pipenvGravatar Leon Sandøy-10/+39
2020-07-19Simplify AllowDenyListType names.Gravatar Leon Sandøy-4/+4
GUILD_INVITE_ID -> GUILD_INVITE WORD_WATCHLIST -> FILTER_TOKEN
2020-07-19Add another AllowDenyList field, 'comment'.Gravatar Leon Sandøy-1/+9
This will be used to describe or justify the entries in the blacklist or whitelist, for example for the guild name in the case of guild invite IDs, so that we have some context when we're displaying the list. https://github.com/python-discord/site/issues/305
2020-07-19Fix misleading documentationGravatar kosayoda-1/+1
2020-07-19Use literal integers for mentions ID in testGravatar kosayoda-14/+2
Since the mentions field stores static IDs and not foreign keys, there is no need to create the objects for the test.
2020-07-17Add an endpoint for getting AllowDenyList types.Gravatar Leon Sandøy-0/+16
https://github.com/python-discord/site/issues/305
2020-07-16100% branch coverage for account.pyGravatar Leon Sandøy-4/+9
https://github.com/python-discord/site/issues/305
2020-07-16100% coverage for account.pyGravatar Leon Sandøy-29/+30
https://github.com/python-discord/site/issues/305
2020-07-16Rename AllowList to AllowDenyList.Gravatar Leon Sandøy-55/+48
https://github.com/python-discord/site/issues/305
2020-07-16Fix some broken tests.Gravatar Leon Sandøy-8/+7
The test_utils_account.py tests were never running, because the folder they were in had no __init__.py file. The test_models.py file was failing because it had an outdated import of the ModelReprMixin, which has moved to a new file. https://github.com/python-discord/site/issues/305
2020-07-16Improve some docstrings.Gravatar Leon Sandøy-6/+26
https://github.com/python-discord/site/issues/305