You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue where manage.py can not be detect as a symlink because find -f doesn't find it.
Some Django projects also don't use manage.py, as createproject can take different templates for starting projects. Some people (myself included) create Django projects from scratch.
In order to support this, would it be considered if I wanted to implement a way to provide a custom Django management command via environment variables?
The text was updated successfully, but these errors were encountered:
@monokrome Hi! Sorry for the delayed reply. I'm working on adding Django collectstatic support for the upcoming Python CNB (Cloud Native Buildpack) that's due to replace this buildpack, and would like to understand the use-case of not having a manage.py more. For these projects, how are Django management commands run? Via the django-admin command (in which case, how is DJANGO_SETTINGS_MODULE and/or --settings defined)? Or is is just that these projects don't have the manage.py file in the repo root, and symlink it instead?
The classic Heroku Python buildpack automatically runs the Django
`collectstatic` command:
https://github.com/heroku/heroku-buildpack-python/blob/main/bin/steps/collectstatic
This adds equivalent support, with a couple of improvements:
- This implementation performs more checks to see whether the app is
actually using the static files feature before trying to run it
(reducing the number of cases where users would need to manually
disable it).
- The collectstatic symlink feature has been enabled, as requested in
heroku/heroku-buildpack-python#1060.
- Symlinked `manage.py` files are now supported, as requested in
heroku/heroku-buildpack-python#972.
- The error messages are finer grained/more useful.
- There are many more tests (including now testing legacy vs latest
Django versions, to check the CLI arguments used work for both ends of
the spectrum).
There is currently no way to force disable the feature (beyond removing
`django.contrib.staticfiles` from `INSTALLED_APPS` in the app's Django
config, or removing the `manage.py` script). Supporting this depends on
us deciding how best to handle buildpack options, so will be added
later, in #109.
The build log output and error messages are fairly reasonable already
(and a significant improvement over the classic buildpack), and will be
further polished as part of the future build output overhaul.
The implementation uses the new `utils::run_command_and_capture_output`
added in #106.
See:
* https://docs.djangoproject.com/en/4.2/howto/static-files/
* https://docs.djangoproject.com/en/4.2/ref/contrib/staticfiles/
* https://docs.djangoproject.com/en/4.2/ref/settings/#settings-staticfilesFixes#5.
GUS-W-9538294.
Uh oh!
There was an error while loading. Please reload this page.
There is an issue where
manage.py
can not be detect as a symlink becausefind -f
doesn't find it.Some Django projects also don't use manage.py, as
createproject
can take different templates for starting projects. Some people (myself included) create Django projects from scratch.In order to support this, would it be considered if I wanted to implement a way to provide a custom Django management command via environment variables?
The text was updated successfully, but these errors were encountered: