1

I am new to django and confused about the setting of static files. Under the django's server, the png which located in my app's "static/" subdirectory displayed correctly in webpage. But when it goes to apache, no image was found. What is the matter? Version of django I use is 1.3. All settings related to static and media in "settings.py" are the default value. I just put the image files in "static/" subdirectory of my app. Eagerly for your help.

Abraham
  • 11
  • 2
  • possible duplicate of [Django Static File Hosting an Apache](http://stackoverflow.com/questions/5682809/django-static-file-hosting-an-apache) and too many others to count. – Daniel Roseman Dec 05 '11 at 13:56

2 Answers2

0

You have to configure Apache to do it. These links will put you on the right track:

bchhun
  • 18,116
  • 8
  • 28
  • 31
0

Actually, since django 1.3, django has had a static files feature.

https://docs.djangoproject.com/en/1.3/ref/contrib/staticfiles/

And BTW, mod_python has been depreciated for mod_wsgi for django apps.

https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/

Levi Campbell
  • 6,005
  • 7
  • 40
  • 47