Issue #3620
closedStatic content not available from pip install
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.
Updated by amacdona@redhat.com over 6 years ago
I noticed a v2 in there. The url should be /pulp/api/v3/docs/
Updated by dkliban@redhat.com over 6 years ago
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/
Updated by dalley over 6 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 36
Updated by bmbouter over 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
Updated by bmbouter over 6 years ago
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
.
Added by bmbouter over 6 years ago
Added by bmbouter over 6 years ago
Revision ba37364b | View on GitHub
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.
Updated by bmbouter over 6 years ago
- Status changed from ASSIGNED to POST
PR available at: https://github.com/pulp/pulp/pull/3495/files
Updated by bmbouter over 6 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|ba37364b6b9276eb2ec7016cb4790c4905ca2083.
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
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