WebFaction
Community site: login faq

Hello, I am trying to add the static files but I can not. I've read a hundred tutorials but either can not run them (no effect) or are using an outdated version (ADMIN_PREFIX).

I also have doubts about when to use the symbolic link and link-static.

My settings are these:

  • Portifolio (Django 1.4.5 (mod_wsgi 3.4/Python 2.7) (port 10173))
  • Media (Static only (no. Htaccess))
  • Static (Symbolic link to static-only app: Extra info / home/myusername/webapps/portifolio/lib/python2.7/django/contrib/admin/static/admin)

My schema folders are (I think is wrong):

home
  ??myusername
     ??webapps
           ??portifolio
                ??project
                    ??project 
                    ??core_app
                    ??manage.py

settings.py:

MEDIA_ROOT = '/home/myusername/webapps/portifolio/project/project/media'

MEDIA_URL = 'http://myusername.webfactional.com/media/'

STATIC_ROOT = '/home/myusername/webapps/portifolio/project/project/static'

STATIC_URL = 'http://myusername.webfactional.com/static/'

STATICFILES_DIRS = (

)

asked 31 Mar '13, 11:36

Filipe Manuel
14
accept rate: 0%

edited 31 Mar '13, 11:41

Have you already tried our documentation here and here?

That will help you set up your admin media as well as your project's static media.

(31 Mar '13, 11:42) bmeyer71 ♦♦

Yes, if you see, is the same as in the documentation.

(31 Mar '13, 11:46) Filipe Manuel

I took a look at your account. It doesn't look like you followed the instructions that I provided above. You create a symlink application which was the old method. Please take another look at the links I provided.

(31 Mar '13, 11:59) bmeyer71 ♦♦

So I said I have doubts about when to use static link and symbolic link, could you explain?

(31 Mar '13, 12:04) Filipe Manuel

I don't understand what you are meaning by a "static link". Step 3f in the documentation provided shows the type of app to create and how to configure your django application to use that app. You just need to collect your static files into that application and you are good to go.

(31 Mar '13, 12:42) bmeyer71 ♦♦

In the tutorial says nothing about MEDIA_ROOT and MEDIA_URL, leave blank?

(31 Mar '13, 14:18) Filipe Manuel

You can leave those blank unless you are allowing media to be uploaded. It is not needed right away for the admin media to be served.

(31 Mar '13, 14:28) bmeyer71 ♦♦
showing 5 of 7 show 2 more comments
Be the first one to answer this question!
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
×40

question asked: 31 Mar '13, 11:36

question was seen: 2,136 times

last updated: 31 Mar '13, 14:28

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