I've been confused with static files in Django for days. I found one solution that worked fine. But it collapsed when I set DEBUG=False. So I build up a new project and do some tests to get a clearer look. First I create a project with the default settings. Then I changed some lines of the setting file into:
STATIC_ROOT = '%s/site_media' % PROJECT_DIR STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(STATIC_ROOT, 'images'), ) After that, I put 'hi.jpg' at 'project_dir/images/hi.jpg'. I call runserver and visit 'http://127.0.0.1:8000/static/images/hi.jpg'. It doesn't work. What's the problem?