aboutsummaryrefslogtreecommitdiffstats
path: root/manage.py (unfollow)
Commit message (Collapse)AuthorLines
2019-10-18Solve migration conflict by renaming migrationsGravatar Sebastiaan Zeeff-6/+6
The migration files were generated and named before the migrations added by other pull requests. This caused the migration path to diverge. Since the migrations did not touch the same models, the solution was to rename the migration files to place them at the end of the migration history.
2019-10-17Add Code of Conduct to navbar submenuGravatar Sebastiaan Zeeff-0/+3
This commit adds a link to the Code of Conduct to the dropdown menu in the navbar. It does not include a direct link to the CoC policies, which are accessible via the Code of Conduct page.
2019-10-14Wiki: Show breadcrumb without menus for users that can't edit, without the ↵Gravatar Gareth Coles-52/+58
root shown
2019-10-14Wiki: Remove Django messages from Wiki templatesGravatar Gareth Coles-25/+0
We've already got this handled in the main base template for the site.
2019-10-14Wiki: Hide breadcrumbs bar if the user can't editGravatar Gareth Coles-1/+3
2019-10-14Remove accidental comment before docstringGravatar Gareth Coles-1/+1
2019-10-14Wiki: Permissions hotfixGravatar Gareth Coles-0/+24
2019-10-14Allauth: Address reviews by @lemonsaurusGravatar Gareth Coles-39/+119
2019-10-12Forgot to update base.html template with favicon changesGravatar ByteCommander-11/+9
2019-10-11Update favicons (rounded corners, other improvements)Gravatar ByteCommander-7/+7
2019-10-11Signals: Handle (and test) mapping updates/deletionsGravatar Gareth Coles-14/+125
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.
2019-10-11Bump PostgreSQL in compose.Gravatar Johannes Christ-1/+1
This might break local PostgreSQL containers with the following error: postgres_1 | 2019-10-11 20:01:48.772 UTC [1] FATAL: database files are incompatible with server postgres_1 | 2019-10-11 20:01:48.772 UTC [1] DETAIL: The data directory was initialized by PostgreSQL version 11, which is not compatible with this version 12.0. You will need to do one of the following: - Delete the old data volume and start from scratch (simple, recommended). As we don't have an explicit volume configured, only the one the PostgreSQL image uses, this is as simple as running `docker-compose stop` followed by `docker-compose rm`. Afterwards, you can restart it. - The dump & restore route. Do this if you don't want to delete your container data. To do this, first switch the PostgreSQL version in `docker-compose.yml` back to `11`, then run the following commands: docker-compose stop # Stop all containers docker-compose start postgres # Start the database docker-compose exec postgres pg_dumpall -U pysite > db.sql # Pull a SQL dump docker-compose stop # Stop the containers again docker-compose rm # Remove the containers Now, update the PostgreSQL version in `docker-compose.yml` to `12` again, and run the following commands: docker-compose up -d postgres # Start the database docker-compose exec -T postgres psql -U pysite < db.sql # Pull in the dump rm db.sql # Cleanup garbage, if you want If you're on Windows, then I can't help you. Sorry.
2019-10-11Deny manual `LogEntry` creation.Gravatar Johannes Christ-0/+4
2019-10-11Resolve migration merge conflicts.Gravatar Johannes Christ-1/+1
2019-10-11Improve formatting for `has_delete_permission`, typespec.Gravatar Johannes Christ-1/+8
2019-10-11Deny `LogEntry` deletion.Gravatar Johannes Christ-0/+5
2019-10-11Allow filtering through metadata, and searching by message.Gravatar Johannes Christ-0/+2
2019-10-11Signals: Fix test for `deletion=True` changeGravatar Gareth Coles-1/+1
2019-10-11Signals: `add()` does require a list, a generator won't do.Gravatar Gareth Coles-2/+2
2019-10-11Clean up signal tests as per @jchristgit's reviewGravatar Gareth Coles-9/+10
2019-10-11Simplify signals.py as per @jchristgit's reviewGravatar Gareth Coles-10/+6
2019-10-11Clarify _apply_groups kwarg (Thanks, @jchristgit)Gravatar Gareth Coles-1/+1
Co-Authored-By: Johannes Christ <[email protected]>
2019-10-11Remove old import.Gravatar Johannes Christ-2/+0
2019-10-11Group fieldsets.Gravatar Johannes Christ-0/+5
2019-10-11Use multi-column output from Django.Gravatar Johannes Christ-32/+1
2019-10-11Pluralize properly.Gravatar Johannes Christ-0/+22
2019-10-11Allow viewing log entries in the Django Admin.Gravatar Johannes Christ-11/+73
2019-10-09Improve homepage flex responsivenessGravatar ByteCommander-26/+18
2019-10-08Add favicons; workaround for gitattributesGravatar ByteCommander-1/+51
2019-10-08Prevent double active infractions with constraintGravatar Sebastiaan Zeeff-2/+111
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.
2019-10-08Migrate undesirable active infraction to inactiveGravatar Sebastiaan Zeeff-0/+754
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
2019-10-07Add validation rules to Infraction serializerGravatar Sebastiaan Zeeff-1/+99
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
2019-10-06Register GH provider manually in testsGravatar Gareth Coles-0/+9
2019-10-06Re-lock Pipfile due to merge with masterGravatar Gareth Coles-18/+17
2019-10-06Remove GH login implementation, out of scope of this PRGravatar Gareth Coles-2/+0
2019-10-06Prevent saving emails, remove login pageGravatar Gareth Coles-86/+34
2019-10-06Replace card on login page with notificationGravatar Gareth Coles-14/+6
2019-10-06Login page and styling fixesGravatar Gareth Coles-23/+117
2019-10-06Make the Bulma colours less saturatedGravatar Gareth Coles-4/+11