Skip to content
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

Deployment #367

Merged
merged 5 commits into from
May 11, 2021
Merged

Deployment #367

merged 5 commits into from
May 11, 2021

Conversation

ddabble
Copy link
Member

@ddabble ddabble commented May 11, 2021

Brings in the changes from the following PRs:

ddabble and others added 5 commits May 11, 2021 20:57
* `default_auto_field` is now automatically added to the generated `apps.py` file, and should therefore be added to our existing app configs
* The new default field type of auto-created primary key fields, is `BigAutoField`, so added migrations to change the type of
  all existing `id` fields
    * According to the docs (see the note on "Migrating auto-created through tables" in
      https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-DEFAULT_AUTO_FIELD), foreign key fields in auto-created through tables
      for many-to-many relationships, will not be updated by these migrations. However, this should not be a problem for us, as SQLite
      (which is used on the server) only supports one `INTEGER` type anyway (which is the type that is used for both `AutoField` and `BigAutoField`
      when using SQLite)
* The `default_app_config` variable in apps' `__init__.py` files has been deprecated
* Added `DEFAULT_AUTO_FIELD` to the settings, to ensure that auto-created primary key fields use the proper type.
  This would normally be `BigAutoField`, but since `social-auth-app-django` has not yet updated to Django 3.2, it should be the old `AutoField`,
  to prevent accidentally creating a migration for that package when running `manage.py migrate` - in addition to preventing a bunch of warnings
  when Django runs its migration checks.
* Updated some Django admin classes to use the new `@admin.display()` annotation
  (see https://docs.djangoproject.com/en/3.2/ref/contrib/admin/#django.contrib.admin.display)
This was caused by the value of the `registrations` entry of the `extra_context` dict field being stored in memory when the server starts,
and never being refreshed - unless the server restarted (which until recently happened every 15 minutes; now it happens once a day).
@ddabble ddabble merged commit 1631cde into master May 11, 2021
@mahoyen mahoyen added the deployment Pull requests from another branch (usually `dev`) into the `main` branch label Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Pull requests from another branch (usually `dev`) into the `main` branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants