First time here? Check out the FAQ!
1

How to configure STATIC_URL setting?
 

I tried to follow the installation steps from here http://askbot.org/doc/initialize-database-tables.html, but when I try to start the webserver I got the following error:

Are there any hints about how to configure static files?

$ python manage.py runserver `hostname -i`:8000
...
.py", line 3, in <module>
    settings = StaticfilesSettings("STATICFILES")
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/staticfiles/utils.py", line 160, in __init__
    value = callback(value)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/staticfiles/settings.py", line 46, in configure_url
    raise ImproperlyConfigured("You're using the staticfiles app "
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the required STATIC_URL setting.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Adi Roiban's avatar
67
Adi Roiban
asked 14 years ago

Comments

see more comments

2 Answers

2

Put

STATIC_URL = '/path_to_your_statics'

and

STATIC_ROOT = '/'

in your settings.py

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
krossner's avatar
36
krossner
updated 14 years ago, answered 14 years ago
link

Comments

OK. But what and where are my 'statics' ... I have no prior Django knowledge, just the information available in the documentation
Adi Roiban's avatar Adi Roiban (14 years ago)
Evgeny has obviously the right answer.
krossner's avatar krossner (14 years ago)
All the statics are in the askbot/skins/default/media and some go to askbot/upfiles
Evgeny's avatar Evgeny (14 years ago)
see more comments
1

The staticfiles application is not used in askbot, it was left in the sample settings.py by mistake, removed now. Sorry about the confusion.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 14 years ago
link

Comments

see more comments