Bug #1319
static files are not served correctly with default settings
0%
Description
Instructions mention collectstatic, but it looks like this calls for a STATICFILES_DIR option in settings.py; unsetting STATIC_ROOT and settings that option fixed static files.
Historique
Mis à jour par Benjamin Dauvergne il y a environ 12 ans
redmine@entrouvert.com écrivait:
Instructions mention collectstatic, but it looks like this calls for
a STATICFILES_DIR option in settings.py; unsetting STATIC_ROOT and
settings that option fixed static files.
The point of the staticfiles Django app si to collect static files in
static/ subdirectory of applications into the STATIC_ROOT directory,
I do not see how it can work without STATIC_ROOT (ignoring the
DEBUG=True case where staticfiles is directly serving files from the
app/static/ directories). It needs more investigations.
Mis à jour par Mikaël Ates il y a environ 12 ans
STATICFILES_DIR should be used if there were static files to collect outside an application static subdirectory, then it seems not necessary.
STATIC_ROOT and STATIC_URL seems set the right way by default.
What do you mean by "that option fixed static files" ?
Mis à jour par Frédéric Péters il y a environ 12 ans
It fixed the serving of static files. I'll have to reinstall things locally to give more details.
Mis à jour par Mikaël Ates il y a environ 12 ans
- Statut changé de Nouveau à En cours
I did an install from scratch and didn't encountered this problem. Have you reproduced the issue?
Mis à jour par Frédéric Péters il y a environ 12 ans
I can't reproduce with the 2.0.0 tarball as the instructions are no longer working (probably because of Django 1.4); it works fine with current git, however I believe it's because I ran authentic2 from its checkout directory, while this bug report came after an installation made via 'pip install authentic2' .
Mis à jour par Mikaël Ates il y a environ 12 ans
The tarball, now release 2.0.1 that runs with Django 1.4, has been updated today on pypi.
Mis à jour par Frédéric Péters il y a environ 12 ans
So I got back to use it and it fails, this is exactly what I do:
mkdir authentic2-venv virtualenv authentic2-venv --system-packages cd authentic2-venv . bin/activate pip install authentic2 pip install django django-profiles django-authopenid south django-debug-toolbar python ./lib/python2.7/site-packages/authentic2/manage.py syncdb --migrate python ./lib/python2.7/site-packages/authentic2/manage.py runserver
And the static files are not served properly, which is to be expected as "find authentic2-venv -name '*.css'" doesn't yield any result.
Mis à jour par Mikaël Ates il y a presque 12 ans
- Statut changé de En cours à Solution déployée
Should be solved by commit b31952b15186629e638a8b4562567170ce7ce398.
The setup script, managed with setuptools from then on, deploys package data.
Tested as follows :
virtualenv venv_a2
cd venv_a2
. bin/activate
git clone http://repos.entrouvert.org/authentic.git
pip install ./authentic
python lib/python2.6/site-packages/authentic2-2.0.1-py2.6.egg/authentic2/manage.py syncdb --migrate
python lib/python2.6/site-packages/authentic2-2.0.1-py2.6.egg/authentic2/manage.py runserver
Mis à jour par Benjamin Dauvergne il y a plus de 9 ans
- Statut changé de Solution déployée à Fermé