Issue #3620
closed
Static content not available from pip install
Status:
CLOSED - CURRENTRELEASE
Description
When following install instructions https://docs.pulpproject.org/en/3.0/nightly/installation/instructions.html and then trying to access /pulp/api/v2/docs/, the page is blank and static content (js/css) returns a 404.
it was suggested to run pulp-manager collectstatic but this failed with error
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
I noticed a v2 in there. The url should be /pulp/api/v3/docs/
The problem is that in our dev environments we have the following in /etc/pulp/server.yaml
DEBUG: True
This causes Django to "handle" the static files for us.
While we are telling users to deploy using the django development web server we need to use the staticfiles app[0].
When we start providing instructions for deploying on a different web server, we will need to provide docs on which static content needs to be served by the web server.
[0] https://docs.djangoproject.com/en/2.0/ref/contrib/staticfiles/
- Triaged changed from No to Yes
- Sprint set to Sprint 36
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
In order to have the development webserver serve this content, we would need to do something like this: http://django-learnings.blogspot.com/2016/02/serving-static-files-when-debug-false.html
Ultimately when using DEBUG=True
I think a real webserver should be used. We don't have any documentation on how to get the static content working so I'm proposing we resolve this via docs. Users who want static content to be served via the development server should set DEBUG=False
.
- Sprint changed from Sprint 36 to Sprint 37
- Status changed from ASSIGNED to POST
- Status changed from POST to MODIFIED
- Sprint/Milestone set to 3.0.0
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
Adds static content docs
This adds static content configuration docs, and adds it as a component in the architecture list. It adds a single step to the installer which refers to the more detailes docs.
It also adds the 'DEBUG: False' as the default to settings.yaml which was missing. It was needed because these docs mention configuring it there.
It also makes a few formatting improvements.
https://pulp.plan.io/issues/3620 closes #3620