WebFaction
Community site: login faq

I'm using mercurial to pull updates of my site to the Webfaction server. For this reason, it is convenient to have all files related to a certain website (I have more than one on one server) within one Django project folder. This would allow me to simply pull the entire project directory from Hg, and immediately have access to the static files as well.

However, given the application structure of Webfaction, how does one serve static media from within a project folder? Or is there a very good reason not to do it?

asked 31 Dec '10, 06:12

Herman
72712
accept rate: 0%


You can do it the same way as described in our documentation on serving admin media. The only difference here would be that you set it up to point to your media directory instead of the admin media.

Say your project looked like this:

my_project
    ??? my_source
        ??? settings.py
        ??? ....
    ??? static
        ??? css
        ??? images
        ??? ...

Your symlink source would be:

/home/<username>/webapps/my_django_app/my_project/static
permanent link

answered 31 Dec '10, 06:23

David L ♦♦
1.4k13
accept rate: 45%

edited 31 Dec '10, 06:23

Ah, great, thanks!

(31 Dec '10, 06:25) Herman
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:

×905
×124
×33

question asked: 31 Dec '10, 06:12

question was seen: 3,476 times

last updated: 31 Dec '10, 06:25

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