-
Notifications
You must be signed in to change notification settings - Fork 9
[OSEDV-814] Upgrade Django and Python #846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 53 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
006d2e6
Upgrage to Django 4.2.6, Python 3.11
VadimKovalenkoSNF cf97fc8
Upgrage to Django 5.1.3
VadimKovalenkoSNF 06e8e96
Fix default timezone issue
VadimKovalenkoSNF b5cea92
Migrate to django-ckeditor-5
VadimKovalenkoSNF 99368bc
Consolidate duplicate index_together compatibility workarounds
VadimKovalenkoSNF f2370ba
Fix api-block route name collision
VadimKovalenkoSNF 2059c64
Use proper utc timezone
VadimKovalenkoSNF 19e7eb1
Fix flake8 issues
VadimKovalenkoSNF 8212503
Use timezone.make_aware() instead of replace(tzinfo=...)
VadimKovalenkoSNF ab75ffd
Remove the last timezone.utc usage
VadimKovalenkoSNF b040ec5
Update release notes
VadimKovalenkoSNF 6bcb0fe
Upd Release notes
VadimKovalenkoSNF 255dc05
Refine phrase in release notes
VadimKovalenkoSNF 59a16b5
Update migrations graph
VadimKovalenkoSNF 2f010ce
Switch the throttling cache backend to django.core.cache.backends.mem…
VadimKovalenkoSNF 7d076f9
Add explicit logging
VadimKovalenkoSNF 905ffce
Fix migration graph
VadimKovalenkoSNF 6c7d60d
Tighten the storage config to always use S3
VadimKovalenkoSNF 996c25e
Use explicit image tag
VadimKovalenkoSNF 6c1b1cb
Use dynamic image tag
VadimKovalenkoSNF 6ca768d
Fix indentation error
VadimKovalenkoSNF 2735b9d
Force S3 bucket storage
VadimKovalenkoSNF f7f3218
Remove cursor artifacts
VadimKovalenkoSNF fc6ccba
Add DJANGO_SETTINGS_MODULE to job configs
VadimKovalenkoSNF 831a6a1
Add logs to the list parsing
VadimKovalenkoSNF 2c32b24
Add DJANGO_SETTINGS_MODULE: oar.settings to all job definitions
VadimKovalenkoSNF b784da8
Introduce FILE_UPLOAD_STORAGE
VadimKovalenkoSNF 9cc1425
Explicit add of DEFAULT_FILE_STORAGE
VadimKovalenkoSNF 40a9b42
Refactor storage init settings
VadimKovalenkoSNF f0b818d
Updated storage settings
VadimKovalenkoSNF 2ae400a
Revome redundant logs and settings
VadimKovalenkoSNF 0c74d70
Remove legacy CKEDITOR_CONFIGS
VadimKovalenkoSNF 9d1f73c
Use REST_AUTH instead of REST_AUTH_SERIALIZER, use tuple unpacking fo…
VadimKovalenkoSNF b94c06b
Resolve merge conflicts
VadimKovalenkoSNF c85c20c
Resolve merge conflicts
VadimKovalenkoSNF c324f4c
Refactor migration graph, update release notes
VadimKovalenkoSNF 29140b6
Remove duplicated migration
VadimKovalenkoSNF a8f7cac
Merge branch 'main' into OSDEV-814-upgrade-django-python
VadimKovalenkoSNF 5f580b3
Merge branch 'main' into OSDEV-814-upgrade-django-python
VadimKovalenkoSNF 78b9330
Drop the legacy index_together index in migration 0195
VadimKovalenkoSNF c46daf1
Remove legacy index and and use AddIndex to create the new api_event_…
VadimKovalenkoSNF 621e455
Update 0197_add_event_index to drop legacy index_together hashes defe…
VadimKovalenkoSNF 352bd36
Upgrade Django to v.5.2
VadimKovalenkoSNF 4d1ea25
Proper configs and import of ckeditor, remove DEFAULT_FILE_STORAGE
VadimKovalenkoSNF 0f4ce23
Merge branch 'main' into OSDEV-814-upgrade-django-python
VadimKovalenkoSNF fabcfa1
Upgrade dj-rest-auth, drf-yasg, django-ckeditor-5
VadimKovalenkoSNF f87facb
Update static files backend settings
VadimKovalenkoSNF 35bb08f
Update release notes
VadimKovalenkoSNF beb1d4b
Set DEFAULT_FILE_STORAGE outside debug mode
VadimKovalenkoSNF 7ba0861
Minor refactoring
VadimKovalenkoSNF 4eef757
Refactor storage settings
VadimKovalenkoSNF 9a0772e
Fix storage condition for static files
VadimKovalenkoSNF 166a51f
Fix admin static manifest by running collectstatic with production st…
VadimKovalenkoSNF 8258471
Bring back TESTING condition
VadimKovalenkoSNF 4cf03ed
Fix storage lookup for Debug mode while CI
VadimKovalenkoSNF 5d396d4
Keep only the valid identifiers and removing CKBox, EasyImage, and I…
VadimKovalenkoSNF feec362
Merge branch 'main' into OSDEV-814-upgrade-django-python
VadimKovalenkoSNF 333c93b
Bring back SPA storage for static files
VadimKovalenkoSNF 53d3bf5
[Test]: remove production flag in Django Dockerfile
VadimKovalenkoSNF f64adaa
Remove redundant django-elasticache
VadimKovalenkoSNF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/django/api/migrations/0196_switch_partner_field_source_by_editor.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| from django.db import migrations | ||
| import django_ckeditor_5.fields | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('api', '0195_add_mit_livingwage_partner_field'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterField( | ||
| model_name='partnerfield', | ||
| name='source_by', | ||
| field=django_ckeditor_5.fields.CKEditor5Field( | ||
| blank=True, | ||
| help_text='Rich text field describing the source of this partner field.', | ||
| null=True, | ||
| ), | ||
| ), | ||
| ] | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("api", "0196_switch_partner_field_source_by_editor"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RunSQL( | ||
| sql=[ | ||
| "DROP INDEX IF EXISTS api_event_content_type_id_object_id_idx", | ||
| "DROP INDEX IF EXISTS api_event_content_type_id_object_id_b046420a_idx", | ||
| ], | ||
| reverse_sql=migrations.RunSQL.noop, | ||
| ), | ||
| migrations.AddIndex( | ||
| model_name="event", | ||
| index=models.Index( | ||
| fields=["content_type", "object_id"], | ||
| name="api_event_content_object_idx", | ||
| ), | ||
| ), | ||
| ] | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/django/api/serializers/user/user_password_reset_confirm_serializer.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/django/api/serializers/user/user_password_reset_serializer.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| """Compatibility shim for legacy migrations that import `ckeditor`.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| from django.db import models | ||
|
|
||
|
|
||
| class RichTextField(models.TextField): | ||
| """Minimal stub to satisfy legacy migrations.""" | ||
|
|
||
| def __init__(self, *args, **kwargs): | ||
| # Legacy migrations pass config_name; ignore it for compatibility. | ||
| kwargs.pop("config_name", None) | ||
| super().__init__(*args, **kwargs) |
vlad-shapik marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| from django.forms import Textarea | ||
|
|
||
|
|
||
| class CKEditorWidget(Textarea): | ||
| """Minimal stub to satisfy any legacy imports.""" | ||
|
|
||
| def __init__(self, *args, **kwargs): | ||
| # Ignore legacy config_name argument if provided. | ||
| kwargs.pop("config_name", None) | ||
| super().__init__(*args, **kwargs) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.