-
Notifications
You must be signed in to change notification settings - Fork 336
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
Django 3 semi-stable #10007
Django 3 semi-stable #10007
Conversation
…ce#9964) Co-authored-by: John Tordoff <>
Use management command in post-migrate signal to create cache table instead of in Raw SQL in migrations Co-authored-by: John Tordoff <>
* Create Waffle Flags and Switches as post_migrate_signal (with configurable values) Co-authored-by: John Tordoff <>
…ience#9961) * remove licenses from migration stream and only use post-migrate signal Co-authored-by: John Tordoff <>
…ate signals (CenterForOpenScience#9974) * Set noop to all ensure_schema migrations * Set noop to shema and shema block updates * Add ensuring schema and updating schema blocks to post-migrate signals * Set noop to one-time data migrations, which include * Preprint permissions * Schema to schema blocks * Draft node permissions * Remove manual post-migration signals from PND * Move generate_object_id into migration utils * Replace duplicate function with inline imports
…orOpenScience#9958) * Fix signal and clean-up * don't use bulk create until ignore_conflicts exsists * allow BLACKLISTED_DOMAINS to be seamlessly overridden Co-authored-by: John Tordoff <>
…nterForOpenScience#9966) * Move loading of citation styles to post-migration signal * Peg repo to commit SHA * Attempt to speed things up by loading fixture * Move update_citation_styles to management command * Remove old test like thing * Clean up URL setting and docstring * Remove install bower from CI setup * Reorder imports * Reintroduce tests, but test skip them * Final clean-up Co-authored-by: John Tordoff <> Co-authored-by: Longze Chen <[email protected]>
…OpenScience#9965) * Remove storage region configuration from the migration stream and add to config file * Only ensure default provider and remove yaml config * Remove default storage region backfill * Region gets or creates, but not updates * Use _id and name as positional arguments and fix osf_settings Co-authored-by: John Tordoff <> Co-authored-by: Longze Chen <[email protected]>
…OpenScience/osf.io into upgrade-markdown * 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io: [ENG-3836] Follow-up: Add PyYAML to Requirements (CenterForOpenScience#9993) [ENG-3867] Create Storage Regions on post migration signal (CenterForOpenScience#9965) [ENG-3866] Move citation style population out of migration stream (CenterForOpenScience#9966) [ENG-3868] Move blocked email domains to post-migrate signal (CenterForOpenScience#9958) [ENG-3863] Move schema ensuring and schema blocks update to post-migrate signals (CenterForOpenScience#9974) [ENG-3865] Create Licenses using post-migrate signal (CenterForOpenScience#9961) [ENG-3836] Investigate waffle flags (CenterForOpenScience#9950) move createcachetable to post migrate signal (CenterForOpenScience#9944) remove post-migrate signals from migration stream (CenterForOpenScience#9964) [ENG-3898][ENG-3899]Model support for OutcomeArtifact update and delete (CenterForOpenScience#9989) Make OutcomeArtifact.identifier nullable (CenterForOpenScience#9986) [ENG-3894] Outcome models (CenterForOpenScience#9975) revert color picker to working version (CenterForOpenScience#9968)
…OpenScience/osf.io into upgrade-password-reset * 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io: [ENG-3836] Follow-up: Add PyYAML to Requirements (CenterForOpenScience#9993) [ENG-3867] Create Storage Regions on post migration signal (CenterForOpenScience#9965) [ENG-3866] Move citation style population out of migration stream (CenterForOpenScience#9966) [ENG-3868] Move blocked email domains to post-migrate signal (CenterForOpenScience#9958) [ENG-3863] Move schema ensuring and schema blocks update to post-migrate signals (CenterForOpenScience#9974) [ENG-3865] Create Licenses using post-migrate signal (CenterForOpenScience#9961) [ENG-3836] Investigate waffle flags (CenterForOpenScience#9950) move createcachetable to post migrate signal (CenterForOpenScience#9944) remove post-migrate signals from migration stream (CenterForOpenScience#9964) [ENG-3898][ENG-3899]Model support for OutcomeArtifact update and delete (CenterForOpenScience#9989) Make OutcomeArtifact.identifier nullable (CenterForOpenScience#9986) [ENG-3894] Outcome models (CenterForOpenScience#9975) revert color picker to working version (CenterForOpenScience#9968)
…OpenScience/osf.io into upgrade-markdown * 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io: [ENG-3862] Move post-migrate signal out of migration stream for default providers (CenterForOpenScience#9971)
…OpenScience/osf.io into upgrade-password-reset * 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io: [ENG-3862] Move post-migrate signal out of migration stream for default providers (CenterForOpenScience#9971)
076803d
to
07803f3
Compare
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary due to our addon structure, regions are dependent on the Django osf app, but it's in the osfstorage addon app.
@@ -63,7 +63,7 @@ def backfill_egap_metadata(dry_run=False, batch_size=None): | |||
schema_version=Max('registered_schema__schema_version') | |||
).filter( | |||
provider___id='egap', | |||
additional_metadata=None, # JSON fields are weird | |||
additional_metadata__isnull=True, # JSON fields are weird |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In https://docs.google.com/document/d/12En4sLtn5CrXZI89aNIqFjaYj26qebHC4SEYayZ_GrY/edit# Change to
=None filter for django.contrib.postgres.fields.JSONField
osf/migrations/__init__.py
Outdated
|
||
def create_cache_table(sender, verbosity=0, **kwargs): | ||
if getattr(sender, 'label', None) == 'osf': | ||
call_command('createcachetable') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createcachetable doesn't take a tablename parameter anymore in Django 3
f5c68d3
to
c43ea63
Compare
83fb1b1
to
549df5d
Compare
0c7fb7e
to
feb809a
Compare
e14bb29
to
b0a6446
Compare
d4bc966
to
cea3db6
Compare
…OpenScience/osf.io into django-3 * 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io: Move file metadata population to unit test fixtures (CenterForOpenScience#9994) Update postgres backend and remove failover router for Django 3 (CenterForOpenScience#10011) Update import paths and fix deprecated modules for Django 3 (CenterForOpenScience#9983) Remove unused password change view/route (CenterForOpenScience#9985) # Conflicts: # admin/common_auth/urls.py # api_tests/files/views/test_file_metadata_record_download.py # api_tests/schemas/views/test_file_metadata_schema_detail.py # osf/migrations/0136_add_datacite_file_metadata_schema.py # osf/migrations/0137_add_fm_record_to_osfstorage_files.py # osf/migrations/__init__.py
…OpenScience/osf.io into django-3 * 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io: Remove password_reset from installed apps
…f.io into django-3 * 'upgrade-markdown' of https://github.com/johnetordoff/osf.io: upgrade markdown
c03627b
to
9e9c487
Compare
Purpose
To document changes necessary to upgrade the OSF to Django 3.
Changes
The Django-include branch being used is here: https://github.com/Johnetordoff/django-include/tree/django-3
Bonus: File Schema population (unit tests uses datacite): removing them from migration and added as fixtures in tests
https://github.com/CenterForOpenScience/osf.io/pull/9994/files
2) core.urlresolvers → urls
[Django Upgrade] [ENG-3947] Update import paths and fix module deprecation #9983
10) Django Reset Password - Update View
[Django Upgrade] [ENG-3947] Remove
password_change
view and route in admin #99853) No Direct assignment of Many-to-Many
[Django Upgrade] [ENG-3947] Direct assignment fix for Django 3 #10010
9) Markdown - extension upgrade
[Django Upgrade] [ENG-3947] Update markdown extension #9984
14) CachedProperty bug for storage region
change location
[Django Upgrade] [ENG-3947] Storage region slice subquery issue #10012
8) Django Debug toolbar - namespace problem
[Django Upgrade] [ENG-3947] Fix django debug toolbar and profiling tools for Django 3 #9987
1) Django 3 - Cors Problems
Upgrade CORS for Django 3 #9982
https://pypi.org/project/django-cors-headers/
15) django.contrib.postgres.fields.jsonb → django.db.models.JSONField
7) restframework.fields.BooleanField.TRUE_VALUES and error messages change
12) Mysterious Session Problems
13) Permissions Overwrite problems
5) LegacyDraftRegistrationSerializer bugs
4) NullBooleanField (warning)
QA Notes
Documentation
Side Effects
Ticket