#29796: Add a system check error if the prefix in the STATICFILES_DIRS ends with
slash
--------------------------------------+------------------------------------
Reporter: pkol | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.staticfiles | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):
* stage: Unreviewed => Accepted
* type: Uncategorized => Cleanup/optimization
Old description:
> Problem:
> With following config:
>
> STATICFILES_DIRS=[ ('front/', os.path.join(BASE_DIR, 'front/build')) ]
>
> files from 'front/build' are collected by 'manage.py collectstatic' but
> no served by 'runserver'.
> The problem is caused by trailing slash in prefix ('front/' instead of
> 'front').
>
> My first solution was to normalize the prefix, but it was suggested that
> it's better to report error.
> (https://github.com/django/django/pull/10441)
>
> I'm going to submit new patch soon.
New description:
With following config:
`STATICFILES_DIRS=[ ('front/', os.path.join(BASE_DIR, 'front/build')) ]`
files from 'front/build' are collected by 'manage.py collectstatic' but no
served by 'runserver'.
The problem is caused by trailing slash in prefix ('front/' instead of
'front').
My first solution was to normalize the prefix, but it was suggested that
it's better to report error.
[https://github.com/django/django/pull/10441 PR]
--
--
Ticket URL: <https://code.djangoproject.com/ticket/29796#comment:1>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/062.45287b2ecdf7118aa7daa29639729a7b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.