WebFaction
Community site: login faq

I have two types of content static content and media content. I have two apps configured on my webfaction associated with my website these are called static_app and static_media_app. This is the configuration I use

STATIC_URL = 'http://mywebsite.com/static/'
STATIC_ROOT = '/home/admin/webapps/static_app'
STATICFILES_DIRS = (
                        '/home/admin/webapps/mainFolder/mainApp/static',
                   )
PROJECT_PATH = os.path.join(BASE_DIR, 'static')
#---------------------------------------------------------------------------
MEDIA_URL = 'http://mywebsite.com/media/'
MEDIA_ROOT = '/home/admin/webapps/static_media_app'

Now whenever I run ./manage.py collectstatic the content from my media gets copied into static_app and I wanted that to be copied in static_media_app folder. Does webfaction differentiate between media and static content ? I have read this post and it states that I would have to create a media folder for my media content just like for my static content. I decided to go with this way because I was having trouble serving my media content with DEBUG = FALSE

asked 14 Jun, 19:47

zedan185's gravatar image

zedan185
112
accept rate: 0%

edited 14 Jun, 19:49


Do not use collectstatic for your uploaded media.

Please refer to my answer to your other question for the correct way to do this: Django - With Debug = False static files being served fine but cannot serve media files

permanent link

answered 15 Jun, 17:43

seanf's gravatar image

seanf ♦♦
11.9k21333
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:

×111
×4
×3

question asked: 14 Jun, 19:47

question was seen: 381 times

last updated: 15 Jun, 17:43

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2017 PARAGON INTERNET GROUP LIMITED
WEBFACTION IS A SERVICE OF PARAGON INTERNET GROUP LIMITED
REGISTERED IN ENGLAND AND WALES 7573953 - VAT REGISTRATION NUMBER 182147021
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM