WebFaction
Community site: login faq

Greetings. My website on Django. Settings settings.py:

STATIC_ROOT = '/ home / <username> / webapps / static_media /'
STATIC_URL = 'media / static'

My application for the distribution of static "static_media", due to the mysite.com / media / static I would like to know what. If I have a separate application for the distribution of static, it turns out that the parameter STATIC_ROOT in settings.py only need to specify where the collection of all the static files of my project team: python2.7 manage.py collectstatic Distributing files itself performs static creation

asked 06 May '13, 04:18

JumpJump
36
accept rate: 0%

edited 06 May '13, 16:20

seanf
12.2k41836


When you run python2.7 manage.py collectstatic in your project directory, it copies your various static files into /home/<username>/webapps/static_media/.

I think you should probably have a leading and trailing slash on your STATIC_URL, eg:

STATIC_URL = '/media/static/'

Once you have the configuration correct, then just add your "static_media" application to your website in our control panel, using "/media/static" as the URL path.

I hope this helps.

permanent link

answered 06 May '13, 16:24

seanf
12.2k41836
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×125
×4

question asked: 06 May '13, 04:18

question was seen: 1,994 times

last updated: 06 May '13, 16:24

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM