On Jun 19, 3:18 pm, Jagdeep Singh Malhi <singh.malh...@gmail.com>
wrote:
> On Jun 17, 5:03 pm, Graham Dumpleton <graham.dumple...@gmail.com>
> wrote:
>
>  i copy the media  directory in  my  "/home/yourname/mysite"
> directory.
>
> > Thus, run Python and go:
>
> > >>> import django
> > >>> import os
> > >>> os.path.dirname(django.__file__)
>
> import django
> import os
> os./usr/local/lib/python2.6/dist-packeages/
> django.media(django.__file__)
>
>  File "<stdin>", line 1
>     os./usr/local/lib/python2.6/dist-packeages/
> django.media(django.__file__)
>        ^
> SyntaxError: invalid syntax

I didn't tell you to run 'django.media()'.

> this show the  syntax  error.......
> where is the problem
>
>
>
> > '/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
>
> and httpd.conf   file entiers
>
> Alias /robots.txt /usr/local/wsgi/static/robots.txt
> Alias /favicon.ico /usr/local/wsgi/static/favicon.ico
>
> AliasMatch /([^/]*\.css) /usr/local/lib/python2.6/dist-packeages/
> django/media/css$1

You shouldn't need this AliasMatch.

> Alias /media/ /usr/local/lib/python2.6/dist-packeages/django/media/

If not copying files and referring to where they are in Django
package, this should be in your case:

  Alias /media/ /usr/local/lib/python2.6/dist-packages/django/contrib/
admin/media/

  <Directory /usr/local/lib/python2.6/dist-packages/django/contrib/
admin/media/>
  Order deny,allow
  Allow from all
  </Directory>

This is presuming that 'os.path.dirname(django.__file__)' did actually
return:

  /usr/local/lib/python2.6/dist-packages/django

Your above statements about what you got are plainly wrong and no
trust that anything is correct about what you did or said the results
were.

Graham

> <Directory /home/jagdeep>
> Order deny,allow
> Allow from all
> </Directory>
>
> WSGIScriptAlias / /home/jagdeep/mysite/apache/django.wsgi
>
> <Directory /home/jagdeep/mysite/apache>
> Order allow,deny
> Allow from all
> </Directory>
>
> Is this correct  .???
> my problem is not solve  Sir , please help.

-- 
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