Skip to content
This repository was archived by the owner on May 25, 2018. It is now read-only.
This repository was archived by the owner on May 25, 2018. It is now read-only.

unable to run newspeak in subdirectory of webserver (probably django-related) #33

@rejozenger

Description

@rejozenger

When attempting to serve the webpages from a subdirectory (https://example.com/ns2/ instead of https://example.com), the links to the CSS and other related files are returning a 404. This is probably just a matter of properly configuring Django.

When I do not configure STATIC_URL the following is generated in the admin/ page where one is asked to login:

<link rel="stylesheet" type="text/css" href="/_static/admin/css/base.css" />
<link rel="stylesheet" type="text/css" href="/_static/admin/css/login.css" />

These do not work and will return a 404. Manually prepending the name of the subdirectory make these valid URL's.

When I add the following:

STATIC_URL = '/ns2/static/'

the following code will be generated:

<link rel="stylesheet" type="text/css" href="/ns2/static/admin/css/base.css" />
<link rel="stylesheet" type="text/css" href="/ns2/static/admin/css/login.css" />

These will return a 404.

When adding:

STATIC_URL = '/ns2/_static/'

The following will be returned:

<link rel="stylesheet" type="text/css" href="/ns2/_static/admin/css/base.css" />
<link rel="stylesheet" type="text/css" href="/ns2/_static/admin/css/login.css" />

These will generate a 404 as well (and please note: these were working when STATIC_URL was not set).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions