Re: django setting problem on windows

2009-05-08 Thread online

Thanks all!

 Finally, i got django working with apache 2.2 mod_python3.1

settings:


SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonOption django.root /web
SetEnv DJANGO_SETTINGS_MODULE web.settings
PythonPath "['C:/depot/projects'] + sys.path"
PythonDebug On


Thanks again.



On May 7, 10:45 pm, Phil Mocek 
wrote:
> On Thu, May 07, 2009 at 10:16:44PM -0700, online wrote:
> > Thanks, i tried changing
>
> > 
> > to
> >   or 
>
> Your third attempt is not even valid syntax.  Doesn't it seem a
> little strange that in the other cases you had quotes enclosing a
> string but then in the third, you did not?
>
> Your problem is completely unrelated to with Django, so it's a bit
> out of place on this list.  As Malcom said previously, you need to
> go read about Apache configuration.  It seems that you either
> didn't read or misunderstood what you read.  Given that you
> haven't asked any questions in an attempt to fill in the parts you
> don't understand, it seems likely that you didn't even read any
> relevant Apache docs.
>
> Maybe if you cite the page that you're using as a reference in
> your attempts to use Apache's location directive, and also explain
> your present understanding of it, someone can help guide you to
> whatever part you're missing or misunderstanding.
>
> --
> Phil Mocek
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django setting problem on windows

2009-05-07 Thread Phil Mocek

On Thu, May 07, 2009 at 10:16:44PM -0700, online wrote:
> Thanks, i tried changing
> 
> 
> to
>   or 

Your third attempt is not even valid syntax.  Doesn't it seem a
little strange that in the other cases you had quotes enclosing a
string but then in the third, you did not?

Your problem is completely unrelated to with Django, so it's a bit
out of place on this list.  As Malcom said previously, you need to
go read about Apache configuration.  It seems that you either
didn't read or misunderstood what you read.  Given that you
haven't asked any questions in an attempt to fill in the parts you
don't understand, it seems likely that you didn't even read any
relevant Apache docs.

Maybe if you cite the page that you're using as a reference in
your attempts to use Apache's location directive, and also explain
your present understanding of it, someone can help guide you to
whatever part you're missing or misunderstanding.

-- 
Phil Mocek

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django setting problem on windows

2009-05-07 Thread zayatzz

If you look at the example i pointed at on django page, then then you
notice that it says path/to/project in pythonpath.

your pythonpath is : PythonPath "['C:/depot/projects/web/'] +
sys.path"

Which seems to me is like path/with/project and should be /depot/
projects as far as i can tell.

If you fix that then change django root to /web/ and leave location to
"/web/"

Check the example on djagopage too, just in case. im writing this by
heart and i am known by simple mistakes that i make :)'

Alan

On May 8, 8:16 am, online  wrote:
> Thanks, i tried changing
y>
> 
> to
>   or 
>
> still no luck
>
> On May 4, 7:49 am, zayatzz  wrote:
>
> > Posting because i just set up httpd.conf on linux computer few days
> > ago and it took me a while to get it working as i wanted to.
>
> > If i just compare the way how i set it up and how you did it Then the
> > difference is that you have no pythonpath like Malcolm said and
> > location should be either "/web/" or "/"
>
> > Take a look at 2nd example here :http://docs.djangoproject.com/en/dev/
> > howto/deployment/modpython/
>
> > Thats the one i used to get it working.
>
> > Alan
>
> > On May 3, 8:24 am, online  wrote:
>
> > > I have mod_python set working fine with apache.
>
> > > I have django setting as following at apache
> > > 
> > > 
> > >     ServerAdmin webmas...@dummy-host2.li
> > >     DocumentRoot "C:/depot/projects/web/"
> > >     ServerName web
> > >     ServerAlias *.web
> > >     ErrorLog "logs/dummy-host2.li-error_log"
> > >     CustomLog "logs/dummy-host2.li-access_log" common
>
> > > 
> > >     SetHandler python-program
> > >     PythonHandler django.core.handlers.modpython
> > >     SetEnv DJANGO_SETTINGS_MODULE web.settings
> > >     PythonOption django.root "C:/depot/projects/web/"
> > >     PythonDebug On
> > > 
>
> > >   
> > >     SetHandler None
> > >   
>
> > >   
> > >     SetHandler None
> > >   
>
> > > 
> > > -
>
> > > But I always got error
>
> > > "ImportError: Settings cannot be imported, because environment
> > > variable DJANGO_SETTINGS_MODULE is undefined.
> > > "
>
> > > Thanks for any 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-users@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
-~--~~~~--~~--~--~---



Re: django setting problem on windows

2009-05-07 Thread online

Thanks, i tried changing


to
  or 


still no luck


On May 4, 7:49 am, zayatzz  wrote:
> Posting because i just set up httpd.conf on linux computer few days
> ago and it took me a while to get it working as i wanted to.
>
> If i just compare the way how i set it up and how you did it Then the
> difference is that you have no pythonpath like Malcolm said and
> location should be either "/web/" or "/"
>
> Take a look at 2nd example here :http://docs.djangoproject.com/en/dev/
> howto/deployment/modpython/
>
> Thats the one i used to get it working.
>
> Alan
>
> On May 3, 8:24 am, online  wrote:
>
> > I have mod_python set working fine with apache.
>
> > I have django setting as following at apache
> > 
> > 
> >     ServerAdmin webmas...@dummy-host2.li
> >     DocumentRoot "C:/depot/projects/web/"
> >     ServerName web
> >     ServerAlias *.web
> >     ErrorLog "logs/dummy-host2.li-error_log"
> >     CustomLog "logs/dummy-host2.li-access_log" common
>
> > 
> >     SetHandler python-program
> >     PythonHandler django.core.handlers.modpython
> >     SetEnv DJANGO_SETTINGS_MODULE web.settings
> >     PythonOption django.root "C:/depot/projects/web/"
> >     PythonDebug On
> > 
>
> >   
> >     SetHandler None
> >   
>
> >   
> >     SetHandler None
> >   
>
> > 
> > -
>
> > But I always got error
>
> > "ImportError: Settings cannot be imported, because environment
> > variable DJANGO_SETTINGS_MODULE is undefined.
> > "
>
> > Thanks for any 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-users@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
-~--~~~~--~~--~--~---



Re: django setting problem on windows

2009-05-04 Thread zayatzz

Posting because i just set up httpd.conf on linux computer few days
ago and it took me a while to get it working as i wanted to.

If i just compare the way how i set it up and how you did it Then the
difference is that you have no pythonpath like Malcolm said and
location should be either "/web/" or "/"

Take a look at 2nd example here :http://docs.djangoproject.com/en/dev/
howto/deployment/modpython/

Thats the one i used to get it working.

Alan

On May 3, 8:24 am, online  wrote:
> I have mod_python set working fine with apache.
>
> I have django setting as following at apache
> 
> 
>     ServerAdmin webmas...@dummy-host2.li
>     DocumentRoot "C:/depot/projects/web/"
>     ServerName web
>     ServerAlias *.web
>     ErrorLog "logs/dummy-host2.li-error_log"
>     CustomLog "logs/dummy-host2.li-access_log" common
>
> 
>     SetHandler python-program
>     PythonHandler django.core.handlers.modpython
>     SetEnv DJANGO_SETTINGS_MODULE web.settings
>     PythonOption django.root "C:/depot/projects/web/"
>     PythonDebug On
> 
>
>   
>     SetHandler None
>   
>
>   
>     SetHandler None
>   
>
> 
> -
>
> But I always got error
>
> "ImportError: Settings cannot be imported, because environment
> variable DJANGO_SETTINGS_MODULE is undefined.
> "
>
> Thanks for any 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-users@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
-~--~~~~--~~--~--~---



Re: django setting problem on windows

2009-05-03 Thread Croydon

I just installed Djang/XAMPP on windows using this guide
http://jyotirmaya.blogspot.com/2008/11/xampp-python-django.html


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django setting problem on windows

2009-05-02 Thread Malcolm Tredinnick

On Sat, 2009-05-02 at 22:24 -0700, online wrote:
> I have mod_python set working fine with apache.
> 
> I have django setting as following at apache
> 
> 
> ServerAdmin webmas...@dummy-host2.li
> DocumentRoot "C:/depot/projects/web/"
> ServerName web
> ServerAlias *.web
> ErrorLog "logs/dummy-host2.li-error_log"
> CustomLog "logs/dummy-host2.li-access_log" common
> 
> 
> 

I'm surprised you get the error you do, because this line should pretty
much be a showstopper for having anything inside it ever being used by
an incoming request. Go back to the documentation for Apache again. You
haven't given the Location directive a URL. You've given it a directory
path.

I would also suspect you're going to need to set the PythonPath option,
based on the file paths you've mentioned here, since they won't be on
the default Python path.

Regards,
Malcolm



--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



django setting problem on windows

2009-05-02 Thread online

I have mod_python set working fine with apache.

I have django setting as following at apache


ServerAdmin webmas...@dummy-host2.li
DocumentRoot "C:/depot/projects/web/"
ServerName web
ServerAlias *.web
ErrorLog "logs/dummy-host2.li-error_log"
CustomLog "logs/dummy-host2.li-access_log" common



SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE web.settings
PythonOption django.root "C:/depot/projects/web/"
PythonDebug On


  
SetHandler None
  

  
SetHandler None
  


-

But I always got error

"ImportError: Settings cannot be imported, because environment
variable DJANGO_SETTINGS_MODULE is undefined.
"

Thanks for any 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-users@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
-~--~~~~--~~--~--~---