Issue #3620
Static 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.
Associated revisions
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.
History
#1
Updated by amacdona@redhat.com over 2 years ago
I noticed a v2 in there. The url should be /pulp/api/v3/docs/
#2
Updated by dkliban@redhat.com over 2 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/
#3
Updated by dalley over 2 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 36
#4
Updated by bmbouter over 2 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
#5
Updated by bmbouter over 2 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
.
#6
Updated by rchan over 2 years ago
- Sprint changed from Sprint 36 to Sprint 37
#7
Updated by bmbouter over 2 years ago
- Status changed from ASSIGNED to POST
PR available at: https://github.com/pulp/pulp/pull/3495/files
#8
Updated by bmbouter over 2 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|ba37364b6b9276eb2ec7016cb4790c4905ca2083.
#9
Updated by dkliban@redhat.com over 2 years ago
- Tags Pulp 3 added
#10
Updated by daviddavis almost 2 years ago
- Sprint/Milestone set to 3.0.0
#11
Updated by bmbouter over 1 year ago
- Tags deleted (
Pulp 3)
#12
Updated by bmbouter about 1 year ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Please register to edit this issue
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