#35822: App name hard-coded in collectstatic command forces name of overriding
app
name to be 'staticfiles'
-------------------------------------+-------------------------------------
Reporter: fishfin | Owner: (none)
Type: Bug | Status: closed
Component: contrib.staticfiles | Version: 5.1
Severity: Normal | Resolution: invalid
Keywords: collectstatic | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by fishfin):
I removed the name.
{{{
from django.contrib.staticfiles.apps import StaticFilesConfig
class MyappConfig(StaticFilesConfig):
# StaticFilesConfig.name = "django.contrib.staticfiles"
ignore_patterns = ["testpattern"]
}}}
Works fine.
I missed a number of things here: INSTALLED_APPS can point to a specific
AppConfig class, which in turn may have a name, which is the app Django
loads. This also loads the management commands in
`django.contrib.staticfiles`, so no overrides of commands were required. I
removed `myapp` as there's no need create one just for staticfiles
commands now, just shifted the overriding class to a file in myproj, and
changed settings.INSTALLED_APPS likewise.
Thank you.
--
Ticket URL: <https://code.djangoproject.com/ticket/35822#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107019270dbe06a-ce0ab1f4-8c6c-4e16-9eeb-6bc73aaed4cd-000000%40eu-central-1.amazonses.com.