Commit graph

79 commits

Author SHA1 Message Date
Bart Schuurmans e7f95ef4c2 Modify update_fields in save() when modifying objects
https://docs.djangoproject.com/en/5.0/releases/4.2/#setting-update-fields-in-model-save-may-now-be-required
2024-04-25 15:53:53 +02:00
Bart Schuurmans 0d621b68e0 Reorder operations in save() overrides
Accessing many-to-many relations before saving is no longer allowed.

Reorder all operations consistently:
1. Validations
2. Modify own fields
3. Perform save by calling super().save()
4. Modify related objects and clear caches

Especially clearing caches should be done after actually saving, otherwise the old data can be
re-added immediately by another request before the new data is written.
2024-04-25 10:12:30 +02:00
Bart Schuurmans c42db40a63 Construct absolute URLs with the correct protocol and port 2024-04-24 15:30:47 +02:00
Mouse Reeve 48f8ee57a6 Merge branch 'main' into check-version-number 2024-02-03 08:02:15 -08:00
Hugh Rundle d640e4ac96
disable user exports by default
- new setting to enable user exports defaults to False
- add setting to enable and disable user exports
- do not allow user exports when using s3 storage
- do not serve non-image files from /images/ (requires update to nginx settings)
- increase default file upload limit to 100MB to enable user exports to be imported (can be changed in .env)
2024-01-16 21:32:13 +11:00
Mouse Reeve f36af42f41 Adds view to see scheduled tasks 2024-01-02 13:05:44 -08:00
Mouse Reeve 5509941aa4 Adds schedule-able task to check for version updates 2024-01-02 13:05:26 -08:00
Mouse Reeve d6f7f76c4d Removes outdated/unused version and updating code
I had the bright idea of creating this update script but it doesn't work
and hasn't been maintained, so it's just sitting there causing confusing
and requiring weird things to exist in other places.

Now, the unused `version` field can be removed and I can scrap the
management command for getting versions.
2024-01-02 11:37:01 -08:00
Hugh Rundle 0276c15948
Merge branch 'main' into user-migration 2023-11-22 21:00:04 +11:00
Mouse Reeve d828ba0bc6 Give admins option to test if a theme loads correctly
If a theme is uploaded incorrectly or has errors in it, users can still
select the theme but it will cause a 500 error on every page, making the
app unusable and also making it impossible for them to switch to a
functional theme.

A better fix would be to fail gracefully, but in lieu of that, this will
at least let admins confirm if a theme is broken safely.
2023-11-20 09:56:51 -08:00
Hugh Rundle a27c652501
admin view for user imports
- makes user_import_time_limit a site setting rather than a value in settings.py (note this applies to exports as well as imports)
- admins can change user_import_time_limit from UI
- admins can cancel stuck user imports
- disabling new imports also disables user imports
2023-10-22 15:07:49 +11:00
Josh Soref 44b4b10eb8 spelling: password
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Christof Dorner dc5b797796 Fix SiteSettings.default_user_auth_group FK on_delete value
The migration uses `RESTRICT` instead of `PROTECT`, which is both more
correct, but also those values need to be identical, otherwise Django
thinks that there's a migration missing and will refuse to apply any
new migrations.
2023-02-18 19:33:25 +01:00
Christof Dorner 2c680cb365 Add default user auth group to registration settings 2023-01-21 17:04:32 +01:00
Mouse Reeve d4351cfcb4
Merge branch 'main' into import-limit 2022-12-16 12:44:57 -08:00
Giebisch df54df8309 Added Import Limit 2022-12-15 23:43:25 +01:00
Mouse Reeve 16f9232e1e Adds database fields for legal page/impressum 2022-11-25 11:02:42 -08:00
Mouse Reeve 7c7c0e1a93 Admin UI to enable and disable importing 2022-11-17 14:23:39 -08:00
Mouse Reeve c47a425cbe Longer invite answer field
It was an oversight that it was only set to 50 characters I expect!
2022-11-15 14:52:07 -08:00
Mouse Reeve 35aebacf70 Fixes theme form and adds view tests 2022-09-19 13:13:21 -07:00
Mouse Reeve 9d8d85ebc1 Invite perms checks 2022-09-19 10:26:40 -07:00
Mouse Reeve 3fd573c0da Check perms on site model form 2022-09-19 10:16:38 -07:00
Mouse Reeve 7b3b357756 Merge branch 'main' into form-conflict 2022-03-16 16:51:57 -07:00
Mouse Reeve 44e68cd0a4 Whitespace fix 2022-03-16 16:50:34 -07:00
Mouse Reeve 820279166a Adds update script 2022-03-16 12:39:49 -07:00
corentin-feys a0ae96923c fix to pass invite request pytest 2022-03-13 23:34:49 +01:00
Orage Pika bcdee8071c fixing errors from check 2022-03-13 15:49:09 +01:00
Orage Pika c99fe2bdc3 fixing errors from checks 2022-03-13 13:37:09 +01:00
Orage Pika d2e6dfc07b fixing errors from checks 2022-03-13 13:31:38 +01:00
Orage Pika 4fb3cbfc29 fixing errors from checks 2022-03-13 13:30:37 +01:00
corentin-feys 5dbee33185 invite_question_text resets to default question when left blank 2022-03-12 11:13:42 +01:00
Orage Pika 0c429ee6d7 bw-dev blacked 2022-03-09 16:04:58 +01:00
Orage Pika 5fbb5c655b custom questions 2022-03-07 18:49:59 +01:00
Mouse Reeve 3dfbb3272e Theme selector 2022-02-27 10:00:50 -08:00
Mouse Reeve 6e96c1eee7 Avoid linter error 2022-02-27 08:09:17 -08:00
Mouse Reeve 43269429ac Use selected theme 2022-02-26 13:40:06 -08:00
Mouse Reeve e15193e100 Adds themes 2022-02-26 12:44:20 -08:00
Mouse Reeve 2883c42534 Disable registration by default 2022-02-17 11:27:05 -08:00
Mouse Reeve c31ec7dbd5 Adds setup view 2022-02-17 10:03:02 -08:00
Mouse Reeve 148f9b6f5e Activate pending users when email confirmation is disabled 2022-01-20 15:58:00 -08:00
Mouse Reeve 3787a31c67 Updates image helpers on site 2021-11-18 14:39:22 -08:00
Mouse Reeve 41dd915d7f Email templates 2021-11-17 20:22:00 -08:00
Mouse Reeve 1be33c97a2 Fixes string formatting in site model 2021-09-20 17:19:26 -07:00
Mouse Reeve cf3157a3b5 Merge branch 'main' into pylint-update 2021-09-20 16:31:27 -07:00
Mouse Reeve 6f0b1d10bb Fixes line length 2021-09-18 16:00:21 -07:00
Mouse Reeve 38c66b208c Adds customizable invite request copy 2021-09-18 15:45:04 -07:00
Mouse Reeve acfb1bb376 Updating string format synatx part 2 2021-09-18 11:32:00 -07:00
Mouse Reeve 2a2dddf5f4 Adds IP blocklist model 2021-09-17 11:58:59 -07:00
Mouse Reeve def4d89bf8 Adds short description to edit site form 2021-09-10 12:13:24 -07:00
Mouse Reeve 9413dacaf2 Updates instance info endpoint 2021-09-10 11:44:51 -07:00