I have a site, where users can upload images. And it works fine in django's own server. But I am using apache to serve both my app and statics. And when I upload any image, I can't see the pics. Only when I runcollectstatic I can see them. Do I always have to run collectstatic? Is there any better way to do this?
my settings.py snippet:
MEDIA_ROOT = 'C:/Users/Robin/web/leo/static' STATIC_ROOT = 'C:/Users/Robin/static/' STATICFILES_DIRS = ( "C:/Users/Robin/web/leo/static", apache http.cont snippet:
AliasMatch ^/([^/]*\.css) C:/Users/Robin/static/styles/$1 Alias /static/ C:/Users/Robin/static/ <Directory C:/Users/Robin/static> Order deny,allow Allow from all </Directory> WSGIScriptAlias / C:/Users/Robin/web/leo/leo/wsgi.py <Directory C:/Users/Robin/web/leo/leo> <Files wsgi.py> Order allow,deny Allow from all </Files> </Directory> Please guide me. Any help will be appreciated greatly. Thank you!
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment