WebFaction
Community site: login faq

when I run python2.7 manage.py collectstatic, I get this:

You have requested to collect static files at the destination location as specified in your settings: /home/davidwkaiser/webapps/mvpland/static_in_env/static_root

This is the wrong directory.

Here are the relevant lines from production.py about static:

*STATIC_URL = '/static/'
STATIC_ROOT = '/home/davidwkaiser/webapps/mvpland_static/'
#os.path.join(os.path.dirname(BASE_DIR), "static_in_env", "static_root")
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, "static_in_pro", "our_static"), 
    #os.path.join(BASE_DIR, "static_in_env"),
    #'/var/www/static/', 
)*

the bit about static_in_ev has been commented out, but it is somehow getting in to the function. Thoughts?

asked 21 Oct '15, 22:14

DavidWKaiser
1112
accept rate: 0%


I just had a look at your account and saw a settings.pycfile in your project directory that might be interfering with your settings. Try deleting that file and then run collectstatic again.

Hope that helps!

permanent link

answered 21 Oct '15, 22:19

seanf
12.2k31836
accept rate: 37%

I deleted settings.pyc, same problem happened:

You have requested to collect static files at the destination location as specified in your settings:

/home/davidwkaiser/webapps/mvpland/static_in_env/static_root

maybe the problem is a production.pyc file, I'll delete that and try

(21 Oct '15, 22:30) DavidWKaiser

Hmm, i deleted production.pyc, still happens. Do I need to refresh or the like after deleting?

(21 Oct '15, 22:32) DavidWKaiser

Your settings/__init__.py has a lot of try-except-pass blocks. Those pass statements are swallowing any error messages that might reveal why your settings aren't being interpreted correctly, so try doing your imports unconditionally to see where the failure is.

(21 Oct '15, 22:40) seanf

Read through:

https://docs.webfaction.com/software/django/config.html#configuring-django

Your static dirs should be like this without the os.path.join

STATICFILES_DIRS = ( '/path/to/static/files/', '/path/to/other/static/files/', )

permanent link

answered 25 Oct '15, 04:35

Pete LoGiudice
113
accept rate: 0%

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
×5

question asked: 21 Oct '15, 22:14

question was seen: 3,323 times

last updated: 25 Oct '15, 04:35

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