Saturday, January 28, 2012

Django Deploy - Some Questions regarding it

Hi there everyone, I'm trying to make my first deploy of a project,
and encountered some problems.
Here is the scenario:
I read that to make uploaded files only accessible for the
uploader(the user) was a better choice to use nginx(apparently more
easy to configure).
But after following a couple of tutorials(a lot of them actually) I
still couldn't make it serve the media files, but them I got really
confuse, and decided that I should review my concepts before trying
any further.
So here are my questions:

Does Nginx serve the files that the user upload or just de static
ones(css, admin_media and stuff)?
If so:
-- Could anyone give me an example of configuration for this?
-- Should I remove the url conf that maps '^media/(?P<path>.*)$' ?
If not:
-- Then how should I config my settings in production so that it
serves my css and admin_media?
-- How should Nginx be configured to serve me this?

And also there are other matters, like:
Should I configure django.sites to point to what? or I don't need this
set?
What is better: Copy admin/media to my media folder, or my static
folder? or should I just make a symlink?
And finally should I change the directory permissions to the nginx
user:group? If so, then what directories? Just the media/static, or
the hole project?(I'm leaving the media/static folder inside the
project folder, is this a problem to deploy?)

Thanks for the atention, any help is welcome since I've been for 4
days trying to make this work(in a virtualmachine, testing in lan) and
still no media/static been served(but I could manage the site to run
and appear, but no css in admin).

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment