WebFaction
Community site: login faq

A Django app is typically two parts; the app containing Python scripts, and the statically served media holding images, CSS files and so on.

Under the webfaction setup, these two are required to be stored in separate locations, namely:

  • ~/webapps/myApp/myproject - contains the app
  • ~/webapps/myStatic - contains the static files

On my local development machine, it would be more normal to structure the project as follows:

  • sites/myApp/myproject
  • sites/myApp/static

myApp would then become the Bazaar repository, so related changes to both parts of the project would be committed in a single transaction.

On the webfactional setup though, this seems difficult to achieve; both Bazaar and Mercurial do not allow a Perforce-style view (checkout of a subsection of a repository).

One workaround could be using Bazaar views - this should work, but is somewhat tedious. Does anyone have a better idea how to achieve a good workflow with this setup?

Thanks!

asked 23 Nov '10, 16:12

redv
2114
accept rate: 0%


Actually you can create a symlink to your media files directly instead of creating a separate folder and creating the app to point to. I am using a symlink directly to my media files without any issues.

permanent link

answered 23 Nov '10, 16:19

bmeyer71 ♦♦
1.5k3613
accept rate: 33%

edited 23 Nov '10, 16:21

I'm sorry, I don't quite get what you mean.. can you give an example source and destination of a symlink like that?

(23 Nov '10, 23:08) redv

Sorry, I guess my edit didn't show up. From the control panel create an app selecting 'Symbolic link to static-only app' and in the Extra info field enter the path to your media files root that you are serving your files from. Specify the path as if you were in the webapps folder. eg: project/media/files This path can then be inside your project folder.

Does that help?

(24 Nov '10, 15:27) bmeyer71 ♦♦

Got it now - many thanks!

(24 Nov '10, 15:44) redv
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
×3

question asked: 23 Nov '10, 16:12

question was seen: 3,342 times

last updated: 24 Nov '10, 15:44

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 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