On Jun 17, 9:17 pm, Jagdeep Singh Malhi <singh.malh...@gmail.com>
wrote:
> i am using this 
> linkhttp://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#howto-...
>
> In this link i am unable to under stand topic  SERVING MEDIA FILES
> the lines(given below) which is used in this tutorial ,  i am able
> understand where  we edit this line , if its edit in apache/
> httpd.conf .so its ok
>
> but I am also not  found  this """/usr/local/wsgi/static/media/"""
> this path  in   my file system ,
> and  where i  place  "/media"  directory which have""css,js,img"
> directory  which is used in admin
>
> {
>
> Alias /robots.txt /usr/local/wsgi/static/robots.txt
> Alias /favicon.ico /usr/local/wsgi/static/favicon.ico
>
> AliasMatch /([^/]*\.css) /usr/local/wsgi/static/styles/$1
>
> Alias /media/ /usr/local/wsgi/static/media/
>
> <Directory /usr/local/wsgi/static>
> Order deny,allow
> Allow from all
> </Directory>
>
> WSGIScriptAlias / /usr/local/wsgi/scripts/django.wsgi
>
> <Directory /usr/local/wsgi/scripts>
> Order allow,deny
> Allow from all
> </Directory>
>
> }
>
> i am used  ubuntu10.04 with apache server
>
> and  my  my project is  place in directory  "/home/your_name/mysite/'

All the directories are examples only, you would change them to be
what is appropriate for your system.

In the case of the media files you would copy them from the contrib/
admin/media directory under where Django is installed to some place
where your site is.

Thus, run Python and go:

>>> import django
>>> import os
>>> os.path.dirname(django.__file__)
'/lib/python2.6/site-packages/django'

Copy the directory called 'contrib/admin/media' from under that
directory and put that with your site. Then set up the Alias to refer
to it.

You could set the Alias to refer to the directory in the installed
Django installation if you want and not copy it, but copying it will
allow you to modify the media files and not muck up your original
Django installation.

Graham


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

Reply via email to