Skip to content

Ensuring the CSS and JS load on PythonAnywhere #3

Description

@jsharer

I followed Nick's instructions from a total fresh start with PythonAnywhere and Wagtail. Everything worked flawlessly, except when I loaded up the admin page on PA after the first deployment. The CSS and JS files referenced by the templates did not load. The resolution from PA turned out to be easy, following their own article: https://help.pythonanywhere.com/pages/DjangoStaticFiles

Based on those instructions, I added the below to the Static Files section of the Web App Settings (with my own domain name in the directory path):

  • URL: /static/
  • Directory: /var/www/sites/www.domain.com/static

Reloaded the page and all was well!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions