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

Hotfix deployment #437

Merged
merged 6 commits into from
Apr 6, 2022
Merged

Hotfix deployment #437

merged 6 commits into from
Apr 6, 2022

Conversation

ddabble
Copy link
Member

@ddabble ddabble commented Apr 6, 2022

Brings in the changes from #436.

ddabble and others added 6 commits April 6, 2022 21:25
Both because it's fairly hard to remember that they're there, which also makes it harder to maintain (like updating the `__all__` list of files),
and because doing things like this is mainly appropriate when creating a library.

This also fixes an issue where the settings were being referenced (through importing `make_queue.views.stream.stream.StreamConsumer` in `asgi.py`)
before the environment variable had been set (in `asgi.py`), when running the `runworker` management command.
`django-simple-history` doesn't currently track changes to many-to-many relationships - which was the main point of this commit
(i.e. to track the changes to `own_permissions`) - but once jazzband/django-simple-history#399 is resolved
(likely through jazzband/django-simple-history#932), it will.
The datetime format of the `Expires` field has also changed to ISO 8601.
The filenames in the contents of the MathJax files were not changed to their hashed versions when running the `collectstatic` management command
(as should normally happen; see https://docs.djangoproject.com/en/4.0/ref/contrib/staticfiles/#manifeststaticfilesstorage),
which caused some JavaScript errors when the library tried to request its other files.

This could have been solved by replacing the names of files in the contents of the MathJax files, with their hashed versions,
but the way a lot of these filenames were being referenced to, made it hard to create patterns
(like the ones in `ManifestStaticFilesStorage.patterns`) for replacing these.

Placed all the MathJax files inside a folder with the version number as its name;
see the comments of the `MANIFEST_STATICFILES_IGNORE_PATTERNS` setting for reasoning.

Also moved the URL parameter for `MathJax.js` outside of the `static` template tag (in `mathjax_render.html`), as it's not part of the filename.
@ddabble ddabble merged commit b886772 into main Apr 6, 2022
@ddabble ddabble added the deployment Pull requests from another branch (usually `dev`) into the `main` branch label Apr 14, 2022
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.

1 participant