| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | |/ / / /
| |/| | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
This also enforces unique values for both attributes on the RoleMapping model. Supporting configurations where this isn't the case would introduce quite a lot of added complexity.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | | |
Co-Authored-By: Johannes Christ <[email protected]>
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |\
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | | |
# Conflicts:
# Pipfile
# Pipfile.lock
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |\
| | | | | |/
| | | | |/| |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
Turns out, setting this *does* move the model to a different category under the admin - but it also reparents it to the referenced app, so the migrations are created under that app instead. Nasty.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | |/
| | | |/| |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
https://github.com/python-discord/site/issues/273
This commits adds a UniqueConstraint for active infractions on a
combination of the `user` and `type` field. This means that a user
can only have one active infraction of a given type in the database
at any time.
I've also added tests to make sure that this behaves as expected.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
https://github.com/python-discord/site/issues/273
This commit adds a data migration to migrate active infractions that
should not be active to inactive. There are two types of infractions
that this migration will migrate to inactive:
- Infractions of types that should never be active (e.g. notes)
- Secondary active infractions if a given user already has an active
infraction of the same type.
Since this makes the migration file fairly complex, I have written
tests to make sure the migration works as expected. In order to do
this, I've subclassed `django.test.TestCase` to create a
`MigrationsTestCase` that takes care of reverting the database back
to a state prior to the migrations we want to test and injects test
data before applying the migrations we want to test.
For more information, see `pydis_site.apps.api.tests.migrations.base`
This implements the last part of and closes #273
|
| |/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
https://github.com/python-discord/site/issues/273
This commit adds validation rules to the Infraction serializer that
validate if a given infraction should be accepted based on its status
of being considered `active`. If the validation fails, the API will
reject the request and return a 400 status.
Specifically, this validator checks that:
- infractions that can never be active do not have `active=True` set;
- a user can never receive a second active infraction of the same type.
Tests have been added to `test_infractions.py` to ensure that the
validators work as expected.
This commit implements the first part of #273
|
| | |_|/
|/| |
| | |
| | | |
used in production anyway
|
| |\ \ \
| |_|/
|/| | |
Fix migrations exclude in flake8
|
| |/ /
| |
| |
| | |
They were not being excluded when flake8 was invoked via pre-commit.
|
| |\ \
| | |
| | | |
Add link to Contributing landing page to our website's navbar
|
| | | |
| | |
| | |
| | |
| | | |
This commit adds a link to the Contributing landing page to the
navbar on our website.
|
| |\ \ \
| | | |
| | | | |
Update contrib doc to point to new wiki links
|
| |/ / / |
|
| |\ \ \
| |/ /
|/| | |
Monkeypatch in new HEADER_ID_PREFIX.
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, all toc-links will have a wiki-toc prefix. This commit
removes this prefix, so that we can header link with just something
like #environment instead of #wiki-toc-environment.
This addresses #276.
https://github.com/python-discord/site/issues/267
|
| |/
|
|
|
|
| |
Previously, the create_superuser() command was called before
migrations had been completed on local setups, and this would
cause the command to crash, saying that the table did not exist.
|
| |\
| |
| | |
Migrate hidden warnings to notes and add additional validation
|
| | |\
| |/
|/| |
|
| | | |
|
| |\ \
| | |
| | | |
Custom `manage.py` Entry Point Script
|
| | |\ \
| |/ /
|/| | |
|