First time here? Check out the FAQ!

Revision history  [back]

After you run command python manage.py collectstatic (it's in the manual), you'll get a directory called static, which will contain static media for all apps included into your project (as defined in the INSTALLED_APPS setting. Admin is just one of those apps.

Do re-run the collectstatic command each time you upgrade the software - that way you will rebuild contents of the static directory to match the latest version of the software.

In the webserver configuration you just need to make sure that urls to all static resources are mapped to the path to those files on the file system.

If you are using the current (at the time of this answer) settings.py template, you'll just need to map /m/ to the static directory.

For example:

    location ^~ /m/ {
            alias /srv/mysite1/static/;
    }

That should work, assuming that your settings.py file is in /srv/mysite1/, and that you're using the default settings.py template (the media-path values inside matter).

After you run command python manage.py collectstatic (it's in the manual), you'll get a directory called static, which will contain static media for all apps included into your project (as defined in the INSTALLED_APPS setting. Admin is just one of those apps.

Do re-run the collectstatic command each time you upgrade the software - that way you will rebuild contents of the static directory to match the latest version of the software.

In the webserver configuration you just need to make sure that urls to all static resources are mapped to the path to those files on the file system.

If you are using the current (at the time of this answer) settings.py template, you'll just need to map /m/ to the static directory.

For example:

    location ^~ /m/ {
            alias /srv/mysite1/static/;
    }

That should work, assuming that your settings.py file is in /srv/mysite1/, and that you're using the default settings.py template (the media-path values inside matter).