Re: Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Carlo Trimarchi
On 16 April 2010 16:05, Owen Nelson  wrote:
> Opps! Since it's an alias, you need to tell apache what server location
> to map.
> For example, if you want http://localhost/ to map to your application:
> WSGIScriptAlias / /path/to/my/wsgi/my.wsgi
> Or if you wanted http://localhost/myapp to map instead
> WSGIScriptAlias /myapp /path/to/my/wsgi/my.wsgi

Thanks, it worked ^^

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



Re: Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Owen Nelson
Opps! Since it's an alias, you need to tell apache what server location
to map.
For example, if you want http://localhost/ to map to your application:
WSGIScriptAlias / /path/to/my/wsgi/my.wsgi
Or if you wanted http://localhost/myapp to map instead
WSGIScriptAlias /myapp /path/to/my/wsgi/my.wsgi

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



Re: Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Owen Nelson
The WSGIScriptAlias directive should point directly to the wsgi script
--  in your case the line should read:
WSGIScriptAlias /home/carlo /home/carlo/mysite/django.wsgi

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



Re: Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Carlo Trimarchi
On 16 April 2010 14:55, Karen Tracey <kmtra...@gmail.com> wrote:
> mod_python development is moribund, mod_wsgi has an active helpful
> maintainer. It's reasonably straightforward to configure mod_wsgi to get
> control only for a certain portion of the URL space, getting that config
> correct for mod_python/Django is not so straightforward.

Ok, I've installed mod_wsgi, but still nothing.

This is my httpd.conf:

LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so

WSGIScriptAlias /home/carlo /home/carlo/mysite

And this is /home/carlo/mysite/django.wsgi

mport os
import sys

sys.path.append('/home/carlo/')
sys.path.append('/home/carlo/mysite')

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

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



Re: Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Karen Tracey
On Fri, Apr 16, 2010 at 10:46 AM, Carlo Trimarchi <mr.spoo...@gmail.com>wrote:

> On 16 April 2010 14:42, Karen Tracey <kmtra...@gmail.com> wrote:
> > Why are you trying to use mod_python here instead of mod_wsgi? mod_wsgi
> is a
> > lot easier to configure properly for this type of setup.
>
> Not sure. I thought it was the preferred way, byt maybe I'm wrong. Is
> there any advantage in using one instead of the other?
>

mod_python development is moribund, mod_wsgi has an active helpful
maintainer. It's reasonably straightforward to configure mod_wsgi to get
control only for a certain portion of the URL space, getting that config
correct for mod_python/Django is not so straightforward. You can also
configure mod_wsgi to operate in daemon mode, so that all of the
mod_wsgi/Django request handling is done in independent processes distinct
from the normal Apache child processes, which can help immeasurably in
eliminating conflicts in libraries, etc. between PHP, Python and whatever
else is running in Apache.

Karen

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



Re: Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Tom Evans
On Fri, Apr 16, 2010 at 3:46 PM, Carlo Trimarchi  wrote:
> On 16 April 2010 14:42, Karen Tracey  wrote:
>> Why are you trying to use mod_python here instead of mod_wsgi? mod_wsgi is a
>> lot easier to configure properly for this type of setup.
>
> Not sure. I thought it was the preferred way, byt maybe I'm wrong. Is
> there any advantage in using one instead of the other?
>

mod_python - python interpreter in every apache child, high memory
usage, hard to configure
mod_php - php interpreter in every apache child, high memory usage
mod_wsgi - out of process python interpreter, communicates with apache
using lightweight IPC, low memory usage, easy to configure, only
supports python*
mod_fcgid - out of process interpreter, communicates with apache using
lightweight IPC, low memory usage, easy to configure, supports all
languages (not just python)

Choice is yours ;)

Cheers

Tom

* well, it supports 'wsgi' protocol - only python talks wsgi 'natively'.

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



Re: Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Carlo Trimarchi
On 16 April 2010 14:42, Karen Tracey  wrote:
> Why are you trying to use mod_python here instead of mod_wsgi? mod_wsgi is a
> lot easier to configure properly for this type of setup.

Not sure. I thought it was the preferred way, byt maybe I'm wrong. Is
there any advantage in using one instead of the other?

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



Re: Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Karen Tracey
Why are you trying to use mod_python here instead of mod_wsgi? mod_wsgi is a
lot easier to configure properly for this type of setup.

Karen

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



Configure Django with mod_python on Ubuntu server

2010-04-16 Thread Carlo Trimarchi
Hi.
I share a server with other people where we usually develop php
applications. I like to program in Python and I wanted to start usind
Django so today I tried to install and configure it. It seems I
succeded, because if I put this in the httpd.conf file it display the
"Django is working" page.


SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mydjangosite.settings
PythonOption django.root /mydjangosite
PythonDebug On
PythonPath "['/home/carlo/public_html/mydjangosite'] + sys.path"


The problem is that I can't set Location to "/", because everything
else (i.e. php) will stop to work as usual. So what I'd like to do is
to set location to a specific location, but I don't know how. I tried
different things, but nothing worked.

When I installed mod_python I tried this:

#
#   AddHandler mod_python .py
#   PythonHandler mptest
#   PythonDebug On
#

And it worked. If I uncomment these lines, for every .py file I point
the browser to it runs mptest and shows the "Hello world" message.

So I think it should be just a problem of setting the right paths, I hope.

My setup is this:

My home directory: /home/carlo
sites directory: /home/carlo/public_html  <--- here I have other
directories, one for each php site
django site directory: /home/carlo/public_html/mydjangosite <--- here
is where settings.py, manage.py and so on are located

What shall I put in the httpd.conf?

Thanks for your help,
Carlo

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



Django 1.1.1 + mod_python = base.css was swallowed in admin pages

2010-02-08 Thread Andrew Budarevsky
Hello All,

I am trying to get my admin pages work but failed. I have several
django apps on the same hosting. For the latest I dopped in the latest
brand new django 1.1.1 and mentioned it via PythonPath directive.
Everything works but admin pages - they miss link to base.css.
-- settings.py 
ADMIN_MEDIA_PREFIX = '/adminmedia/'
 link to fresh django admin ---
19:10 adminmedia -> /home/g/grifoncons/django_projects/django-latest/
django/contrib/admin/media/
-- .htaccess -
RewriteEngine on

RewriteRule ^/media/(.*)$ /media/$1 [QSA,L,PT]
RewriteRule ^/static/(.*)$ /static/$1 [QSA,L,PT]

SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE shoeshop.settings
# PythonOption django.root backoffice/
PythonInterpreter bridgidda-cp
PythonPath "['/home/g/grifoncons/django_projects/django-latest/
django/','/home/g/grifoncons/django_projects/','/home/g/grifoncons/
django_projects/shoeshop','/home/g/grifoncons/django_projects/shoeshop/
backoffice']+sys.path"
PythonDebug On

Options +FollowSymLinks


- generated admin page --

http://www.w3.org/1999/xhtml; lang="ru-ru" xml:lang="ru-
ru" >

Администрирование сайта | Административный сайт Django

--

What I missed?  I am really stucked... I also tried the latest svn
version with the same result. My previous applications use django 1.0
placed at hosting and copied admin/media content into web root of the
application works well.

Andrew

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



Re: Deploying Django Apache mod_python

2008-09-25 Thread [EMAIL PROTECTED]

Thank you so much :-)! That did the trick.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Deploying Django Apache mod_python

2008-09-25 Thread Bojan Mihelac

Would this help:

PythonPath "['/home/user/projects', '/home/user/projects/myproject'] +
sys.path"

Bojan

On Sep 25, 6:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to deploy my django project, but when I go to any urls of
> the project I get this error:
>
> Mod_python error: "PythonHandler django.core.handlers.modpython"
>
> Traceback (most recent call last):
>
>   File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
> 299, in HandlerDispatch
>     result = object(req)
>
>   File "/usr/lib/python2.4/site-packages/django/core/handlers/
> modpython.py", line 222, in handler
>     return ModPythonHandler()(req)
>
>   File "/usr/lib/python2.4/site-packages/django/core/handlers/
> modpython.py", line 195, in __call__
>     response = self.get_response(request)
>
>   File "/usr/lib/python2.4/site-packages/django/core/handlers/
> base.py", line 128, in get_response
>     return self.handle_uncaught_exception(request, resolver, exc_info)
>
>   File "/usr/lib/python2.4/site-packages/django/core/handlers/
> base.py", line 159, in handle_uncaught_exception
>     callback, param_dict = resolver.resolve500()
>
>   File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py",
> line 217, in resolve500
>     return self._resolve_special('500')
>
>   File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py",
> line 206, in _resolve_special
>     callback = getattr(self.urlconf_module, 'handler%s' % view_type)
>
>   File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py",
> line 197, in _get_urlconf_module
>     self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])
>
>   File "/home/user/projects/myproject/../myproject/urls.py", line 5,
> in ?
>     admin.autodiscover()
>
>   File "/usr/lib/python2.4/site-packages/django/contrib/admin/
> __init__.py", line 40, in autodiscover
>     __import__("%s.admin" % app)
>
>   File "/home/user/projects/myproject/../myproject/news/admin.py",
> line 2, in ?
>     from myproject.news.models import Logo
>
>   File "/home/user/projects/myproject/../myproject/news/models.py",
> line 3, in ?
>     from tags.models import Tag
>
> ImportError: No module named tags.models
>
> The following is my Location section of httpd.conf:
>
> 
>     SetHandler python-program
>     PythonPath "['/home/user/projects'] + sys.path"
>     PythonHandler django.core.handlers.modpython
>     SetEnv DJANGO_SETTINGS_MODULE myproject.settings
>     PythonDebug On
> 
>
> My project exists in: /home/user/projects/myproject
>
> Any help would be much appreciated.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Deploying Django Apache mod_python

2008-09-25 Thread [EMAIL PROTECTED]

And my django install is in /usr/lib/python2.4/site-packages/django
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Deploying Django Apache mod_python

2008-09-25 Thread [EMAIL PROTECTED]

Hi,

I'm trying to deploy my django project, but when I go to any urls of
the project I get this error:

Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
result = object(req)

  File "/usr/lib/python2.4/site-packages/django/core/handlers/
modpython.py", line 222, in handler
return ModPythonHandler()(req)

  File "/usr/lib/python2.4/site-packages/django/core/handlers/
modpython.py", line 195, in __call__
response = self.get_response(request)

  File "/usr/lib/python2.4/site-packages/django/core/handlers/
base.py", line 128, in get_response
return self.handle_uncaught_exception(request, resolver, exc_info)

  File "/usr/lib/python2.4/site-packages/django/core/handlers/
base.py", line 159, in handle_uncaught_exception
callback, param_dict = resolver.resolve500()

  File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py",
line 217, in resolve500
return self._resolve_special('500')

  File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py",
line 206, in _resolve_special
callback = getattr(self.urlconf_module, 'handler%s' % view_type)

  File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py",
line 197, in _get_urlconf_module
self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])

  File "/home/user/projects/myproject/../myproject/urls.py", line 5,
in ?
admin.autodiscover()

  File "/usr/lib/python2.4/site-packages/django/contrib/admin/
__init__.py", line 40, in autodiscover
__import__("%s.admin" % app)

  File "/home/user/projects/myproject/../myproject/news/admin.py",
line 2, in ?
from myproject.news.models import Logo

  File "/home/user/projects/myproject/../myproject/news/models.py",
line 3, in ?
from tags.models import Tag

ImportError: No module named tags.models



The following is my Location section of httpd.conf:


SetHandler python-program
PythonPath "['/home/user/projects'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
PythonDebug On


My project exists in: /home/user/projects/myproject


Any help would be much appreciated.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah

I am an idiot.

It WAS the UniqueID. I had this idea that it it mapped to the
SECRET_KEY for some reason.

Sorry for the confusion.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah

Actually, this is my httpd.conf at the bottom:

# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#
#ServerAdmin [EMAIL PROTECTED]
#DocumentRoot /www/docs/dummy-host.example.com
#ServerName dummy-host.example.com
#ErrorLog logs/dummy-host.example.com-error_log
#CustomLog logs/dummy-host.example.com-access_log common
#


Hmm... there are no vhosts setup here, how the heck am i hosting many
sites?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah

Ok, the NameVirtualHost in the main httpd.conf is not enabled. How
should i configure this? am i supposed to choose a specific domain? or
them all?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah

Also, i made sure the "UniqueID" is infact unique:D
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django and mod_python with vhosts

2008-07-03 Thread joshuajonah

The directive is this:


SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonPath "['/var/www/vhosts/hftvnetwork.com/django-projects'] +
sys.path"
SetEnv DJANGO_SETTINGS_MODULE DSN.settings
PythonDebug On
PythonInterpreter UniqueID


I will check the "NameVirtualHost" now.



On Jul 3, 9:08 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Jul 4, 11:03 am, joshuajonah <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a Media Temple DV server, it has 7 sites hosted on it, 5 of
> > them are paying clients.
>
> > The vhost file structure is like this:
>
> > /var/www/vhosts/whatever.com/
> > /var/www/vhosts/whatever2.com/
> > /var/www/vhosts/whatever3.com/
>
> > There are vhost.conf files in a "conf" directory (e.g: /var/www/vhosts/
> > whatever.com/conf/vhost.conf), these are for domain specific
> > directives, like say... a python handler and path;)
>
> > Problem:
> > When I change one in a domain, it is affecting another domain using
> > django hosted on the server.
>
> Exactly what change are you making?
>
> > I called MediaTemple and they advised me that there is no way this
> > could happen. It is likely a problem with the fact that there is a
> > single Django or Mod_Python install on the server.
>
> > Has anybody dealt with this or know what is going wrong?
>
> Is NameVirtualHost directive in Apache set. When using VirtualHost, if
> not set then it causes problems for mod_python with strange merging of
> sites.
>
> Also, are you playing with PythonInterpreter directive at all either
> within VirtualHost container or outside at global scope?
>
> 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-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django and mod_python with vhosts

2008-07-03 Thread Graham Dumpleton

On Jul 4, 11:03 am, joshuajonah <[EMAIL PROTECTED]> wrote:
> I have a Media Temple DV server, it has 7 sites hosted on it, 5 of
> them are paying clients.
>
> The vhost file structure is like this:
>
> /var/www/vhosts/whatever.com/
> /var/www/vhosts/whatever2.com/
> /var/www/vhosts/whatever3.com/
>
> There are vhost.conf files in a "conf" directory (e.g: /var/www/vhosts/
> whatever.com/conf/vhost.conf), these are for domain specific
> directives, like say... a python handler and path;)
>
> Problem:
> When I change one in a domain, it is affecting another domain using
> django hosted on the server.

Exactly what change are you making?

> I called MediaTemple and they advised me that there is no way this
> could happen. It is likely a problem with the fact that there is a
> single Django or Mod_Python install on the server.
>
> Has anybody dealt with this or know what is going wrong?

Is NameVirtualHost directive in Apache set. When using VirtualHost, if
not set then it causes problems for mod_python with strange merging of
sites.

Also, are you playing with PythonInterpreter directive at all either
within VirtualHost container or outside at global scope?

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-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



django and mod_python with vhosts

2008-07-03 Thread joshuajonah

I have a Media Temple DV server, it has 7 sites hosted on it, 5 of
them are paying clients.

The vhost file structure is like this:

/var/www/vhosts/whatever.com/
/var/www/vhosts/whatever2.com/
/var/www/vhosts/whatever3.com/

There are vhost.conf files in a "conf" directory (e.g: /var/www/vhosts/
whatever.com/conf/vhost.conf), these are for domain specific
directives, like say... a python handler and path;)

Problem:
When I change one in a domain, it is affecting another domain using
django hosted on the server.

I called MediaTemple and they advised me that there is no way this
could happen. It is likely a problem with the fact that there is a
single Django or Mod_Python install on the server.

Has anybody dealt with this or know what is going wrong?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django - Apache - mod_python setup

2008-06-24 Thread Nagu

Karen:

Thank you a million Karen. I changed the curly quotes to ordinary
quotes and restarted Apache. It works fine.

I was elated when I accessed the http://cobra.mycompany.com/petview
and saw it working from another machine. This is my first toy with web
application.

Karen, thank you very much again. Is there way I can buy a beer for
you? Or, please buy yourself a beer and please send me the bill. I
will happy to pay for it. Or if you know another way, please let me
know.

Thank you again.
Nagu


On Jun 24, 10:30 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 24, 2008 at 12:38 PM, Nagu <[EMAIL PROTECTED]> wrote:
>
> > Karen:
>
> > I followed the instructions at
> >http://www.djangoproject.com/documentation/modpython/
> > .
>
> > Here are the settings I added to the httpd.conf file:
>
> > 
> >    SetHandler python-program
> >    PythonHandler django.core.handlers.modpython
> >    SetEnv DJANGO_SETTINGS_MODULE petinfosite.settings
> >    PythonDebug On
> >    PythonPath "['C:/django/petinfosite','C:/django/petinfosite/
> > petinfostore']+sys.path"
> > 
>
> I assume you restarted Apache after making this change?
>
> The project (settings.py) is in c:/django/petinfosite/ and the
>
> > application (view.py) is in C:/django/petinfosite/petinfostore/.
>
> You're not getting this far yet, but unless C:/django is already in the
> sys.path, your settings file won't be found with what you've placed in
> PythonPath, since you've included 'petinfosite' in both the settings module
> spec and the PythonPath elements.
>
> > When I accesshttp://cobra.mycompany.com/petview, I get a 404 with the
> > following error:
> > The requested URL /petview was not found on this server.
>
> This is the Apache standard 404 error page, meaning your Location directive
> isn't being used.  First question is did you restart Apache?  Assuming yes,
> I tried cut-and-paste of your  block into an Apache config and
> found that all the quotes (both single and double) in that block are
> "curly", not regular straight quotes.  You want typewriter quotes in your
> Apache config, it's not going to understand the others.  So, if the curly
> variety is really what you have in your config, you either need to configure
> the editor you are using to use regular quotes or find another editor and
> fix the quotes.
>
> Karen
>
> > When I accesshttp://localhost:8000/petview/, it works fine.
>
> > Please help.
>
> > Thank you,
> > Nagu
>
> > On Jun 23, 8:37 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> > > On Mon, Jun 23, 2008 at 7:38 PM, Nagu <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > I am very new to programming in general. I start to teach myself some
> > > > python and django stuff.
>
> > > > I followed the instructions in the chapter 3 of the book Professional
> > > > Python Frameworks by Moore, Budd, and Wright. Just to give some idea,
> > > > it is a simple pet owner site, select the owner and it displays their
> > > > pets in the browser.
>
> > > > It is working fine from a localhost, i.e. when I type
> > > >http://127.0.0.1:8000/petview.
> > > > Now I want to set it up on a local area network so that I can access
> > > > it from other machine, for example,http://cobra.mycompany.com/petview.
> > > > Here Cobra is the my machine name and mycompany.com is my company
> > > > domain. I do not have access to tinker with mycompany.com. Cobra is a
> > > > windows xp machine attached to the mycompany.com
>
> > > > I installed postgresSQL and Apache and mod_python on the machine
> > > > cobra. Apache is running OK by default. I ranhttp://
> > cobra.mycompany.com
> > > > from another machine, and it displays OK. But when I type
> > > >http://cobra.mycompany.com/petview, I get a 404. I am sure that I am
> > > > doing wrong. I want to learn how to set this kind of settings. Please
> > > > advice.
>
> > > Did you follow the instructions here:
>
> > >http://www.djangoproject.com/documentation/modpython/
>
> > > for how to configure Apache/mod_python to forward requests to your Django
> > > code?
>
> > > Karen
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django - Apache - mod_python setup

2008-06-24 Thread Karen Tracey
On Tue, Jun 24, 2008 at 12:38 PM, Nagu <[EMAIL PROTECTED]> wrote:

>
> Karen:
>
> I followed the instructions at
> http://www.djangoproject.com/documentation/modpython/
> .
>
> Here are the settings I added to the httpd.conf file:
>
> 
>SetHandler python-program
>PythonHandler django.core.handlers.modpython
>SetEnv DJANGO_SETTINGS_MODULE petinfosite.settings
>PythonDebug On
>PythonPath "['C:/django/petinfosite','C:/django/petinfosite/
> petinfostore']+sys.path"
> 
>

I assume you restarted Apache after making this change?

The project (settings.py) is in c:/django/petinfosite/ and the
> application (view.py) is in C:/django/petinfosite/petinfostore/.
>

You're not getting this far yet, but unless C:/django is already in the
sys.path, your settings file won't be found with what you've placed in
PythonPath, since you've included 'petinfosite' in both the settings module
spec and the PythonPath elements.


> When I access http://cobra.mycompany.com/petview, I get a 404 with the
> following error:
> The requested URL /petview was not found on this server.
>

This is the Apache standard 404 error page, meaning your Location directive
isn't being used.  First question is did you restart Apache?  Assuming yes,
I tried cut-and-paste of your  block into an Apache config and
found that all the quotes (both single and double) in that block are
"curly", not regular straight quotes.  You want typewriter quotes in your
Apache config, it's not going to understand the others.  So, if the curly
variety is really what you have in your config, you either need to configure
the editor you are using to use regular quotes or find another editor and
fix the quotes.

Karen


> When I access http://localhost:8000/petview/, it works fine.
>
> Please help.
>
> Thank you,
> Nagu
>
> On Jun 23, 8:37 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> > On Mon, Jun 23, 2008 at 7:38 PM, Nagu <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> >
> > > I am very new to programming in general. I start to teach myself some
> > > python and django stuff.
> >
> > > I followed the instructions in the chapter 3 of the book Professional
> > > Python Frameworks by Moore, Budd, and Wright. Just to give some idea,
> > > it is a simple pet owner site, select the owner and it displays their
> > > pets in the browser.
> >
> > > It is working fine from a localhost, i.e. when I type
> > >http://127.0.0.1:8000/petview.
> > > Now I want to set it up on a local area network so that I can access
> > > it from other machine, for example,http://cobra.mycompany.com/petview.
> > > Here Cobra is the my machine name and mycompany.com is my company
> > > domain. I do not have access to tinker with mycompany.com. Cobra is a
> > > windows xp machine attached to the mycompany.com
> >
> > > I installed postgresSQL and Apache and mod_python on the machine
> > > cobra. Apache is running OK by default. I ranhttp://
> cobra.mycompany.com
> > > from another machine, and it displays OK. But when I type
> > >http://cobra.mycompany.com/petview, I get a 404. I am sure that I am
> > > doing wrong. I want to learn how to set this kind of settings. Please
> > > advice.
> >
> > Did you follow the instructions here:
> >
> > http://www.djangoproject.com/documentation/modpython/
> >
> > for how to configure Apache/mod_python to forward requests to your Django
> > code?
> >
> > Karen
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django - Apache - mod_python setup

2008-06-24 Thread joshuajonah

since you are accessing a subdomain, there may be a vhost for your
machine with an apache install for the whole domain... Are you the
admin of the domain? if not you may want to have a chat with them.

On Jun 24, 12:38 pm, Nagu <[EMAIL PROTECTED]> wrote:
> Karen:
>
> I followed the instructions at  
> http://www.djangoproject.com/documentation/modpython/
> .
>
> Here are the settings I added to the httpd.conf file:
>
> 
> SetHandler python-program
> PythonHandler django.core.handlers.modpython
> SetEnv DJANGO_SETTINGS_MODULE petinfosite.settings
> PythonDebug On
> PythonPath “[‘C:/django/petinfosite’,‘C:/django/petinfosite/
> petinfostore’]+sys.path”
> 
>
> The project (settings.py) is in c:/django/petinfosite/ and the
> application (view.py) is in C:/django/petinfosite/petinfostore/.
>
> When I accesshttp://cobra.mycompany.com/petview, I get a 404 with the
> following error:
> The requested URL /petview was not found on this server.
>
> When I accesshttp://localhost:8000/petview/, it works fine.
>
> Please help.
>
> Thank you,
> Nagu
>
> On Jun 23, 8:37 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
>
> > On Mon, Jun 23, 2008 at 7:38 PM, Nagu <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I am very new to programming in general. I start to teach myself some
> > > python and django stuff.
>
> > > I followed the instructions in the chapter 3 of the book Professional
> > > Python Frameworks by Moore, Budd, and Wright. Just to give some idea,
> > > it is a simple pet owner site, select the owner and it displays their
> > > pets in the browser.
>
> > > It is working fine from a localhost, i.e. when I type
> > >http://127.0.0.1:8000/petview.
> > > Now I want to set it up on a local area network so that I can access
> > > it from other machine, for example,http://cobra.mycompany.com/petview.
> > > Here Cobra is the my machine name and mycompany.com is my company
> > > domain. I do not have access to tinker with mycompany.com. Cobra is a
> > > windows xp machine attached to the mycompany.com
>
> > > I installed postgresSQL and Apache and mod_python on the machine
> > > cobra. Apache is running OK by default. I ranhttp://cobra.mycompany.com
> > > from another machine, and it displays OK. But when I type
> > >http://cobra.mycompany.com/petview, I get a 404. I am sure that I am
> > > doing wrong. I want to learn how to set this kind of settings. Please
> > > advice.
>
> > Did you follow the instructions here:
>
> >http://www.djangoproject.com/documentation/modpython/
>
> > for how to configure Apache/mod_python to forward requests to your Django
> > code?
>
> > Karen
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django - Apache - mod_python setup

2008-06-24 Thread Nagu

Karen:

I followed the instructions at  
http://www.djangoproject.com/documentation/modpython/
.

Here are the settings I added to the httpd.conf file:


SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE petinfosite.settings
PythonDebug On
PythonPath “[‘C:/django/petinfosite’,‘C:/django/petinfosite/
petinfostore’]+sys.path”


The project (settings.py) is in c:/django/petinfosite/ and the
application (view.py) is in C:/django/petinfosite/petinfostore/.

When I access http://cobra.mycompany.com/petview, I get a 404 with the
following error:
The requested URL /petview was not found on this server.

When I access http://localhost:8000/petview/, it works fine.

Please help.

Thank you,
Nagu

On Jun 23, 8:37 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 23, 2008 at 7:38 PM, Nagu <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I am very new to programming in general. I start to teach myself some
> > python and django stuff.
>
> > I followed the instructions in the chapter 3 of the book Professional
> > Python Frameworks by Moore, Budd, and Wright. Just to give some idea,
> > it is a simple pet owner site, select the owner and it displays their
> > pets in the browser.
>
> > It is working fine from a localhost, i.e. when I type
> >http://127.0.0.1:8000/petview.
> > Now I want to set it up on a local area network so that I can access
> > it from other machine, for example,http://cobra.mycompany.com/petview.
> > Here Cobra is the my machine name and mycompany.com is my company
> > domain. I do not have access to tinker with mycompany.com. Cobra is a
> > windows xp machine attached to the mycompany.com
>
> > I installed postgresSQL and Apache and mod_python on the machine
> > cobra. Apache is running OK by default. I ranhttp://cobra.mycompany.com
> > from another machine, and it displays OK. But when I type
> >http://cobra.mycompany.com/petview, I get a 404. I am sure that I am
> > doing wrong. I want to learn how to set this kind of settings. Please
> > advice.
>
> Did you follow the instructions here:
>
> http://www.djangoproject.com/documentation/modpython/
>
> for how to configure Apache/mod_python to forward requests to your Django
> code?
>
> Karen
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django - Apache - mod_python setup

2008-06-24 Thread James Matthews
After that you need to setup a view in django and point that to a page (or
function)

On Tue, Jun 24, 2008 at 5:37 AM, Karen Tracey <[EMAIL PROTECTED]> wrote:

> On Mon, Jun 23, 2008 at 7:38 PM, Nagu <[EMAIL PROTECTED]> wrote:
>
>>
>> Hi,
>>
>> I am very new to programming in general. I start to teach myself some
>> python and django stuff.
>>
>> I followed the instructions in the chapter 3 of the book Professional
>> Python Frameworks by Moore, Budd, and Wright. Just to give some idea,
>> it is a simple pet owner site, select the owner and it displays their
>> pets in the browser.
>>
>> It is working fine from a localhost, i.e. when I type
>> http://127.0.0.1:8000/petview.
>> Now I want to set it up on a local area network so that I can access
>> it from other machine, for example, http://cobra.mycompany.com/petview.
>> Here Cobra is the my machine name and mycompany.com is my company
>> domain. I do not have access to tinker with mycompany.com. Cobra is a
>> windows xp machine attached to the mycompany.com
>>
>> I installed postgresSQL and Apache and mod_python on the machine
>> cobra. Apache is running OK by default. I ran http://cobra.mycompany.com
>> from another machine, and it displays OK. But when I type
>> http://cobra.mycompany.com/petview, I get a 404. I am sure that I am
>> doing wrong. I want to learn how to set this kind of settings. Please
>> advice.
>>
>
> Did you follow the instructions here:
>
> http://www.djangoproject.com/documentation/modpython/
>
> for how to configure Apache/mod_python to forward requests to your Django
> code?
>
> Karen
>
> >
>


-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://www.goldwatches.com

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django - Apache - mod_python setup

2008-06-23 Thread Karen Tracey
On Mon, Jun 23, 2008 at 7:38 PM, Nagu <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I am very new to programming in general. I start to teach myself some
> python and django stuff.
>
> I followed the instructions in the chapter 3 of the book Professional
> Python Frameworks by Moore, Budd, and Wright. Just to give some idea,
> it is a simple pet owner site, select the owner and it displays their
> pets in the browser.
>
> It is working fine from a localhost, i.e. when I type
> http://127.0.0.1:8000/petview.
> Now I want to set it up on a local area network so that I can access
> it from other machine, for example, http://cobra.mycompany.com/petview.
> Here Cobra is the my machine name and mycompany.com is my company
> domain. I do not have access to tinker with mycompany.com. Cobra is a
> windows xp machine attached to the mycompany.com
>
> I installed postgresSQL and Apache and mod_python on the machine
> cobra. Apache is running OK by default. I ran http://cobra.mycompany.com
> from another machine, and it displays OK. But when I type
> http://cobra.mycompany.com/petview, I get a 404. I am sure that I am
> doing wrong. I want to learn how to set this kind of settings. Please
> advice.
>

Did you follow the instructions here:

http://www.djangoproject.com/documentation/modpython/

for how to configure Apache/mod_python to forward requests to your Django
code?

Karen

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django - Apache - mod_python setup

2008-06-23 Thread Nagu

Hi,

I am very new to programming in general. I start to teach myself some
python and django stuff.

I followed the instructions in the chapter 3 of the book Professional
Python Frameworks by Moore, Budd, and Wright. Just to give some idea,
it is a simple pet owner site, select the owner and it displays their
pets in the browser.

It is working fine from a localhost, i.e. when I type 
http://127.0.0.1:8000/petview.
Now I want to set it up on a local area network so that I can access
it from other machine, for example, http://cobra.mycompany.com/petview.
Here Cobra is the my machine name and mycompany.com is my company
domain. I do not have access to tinker with mycompany.com. Cobra is a
windows xp machine attached to the mycompany.com

I installed postgresSQL and Apache and mod_python on the machine
cobra. Apache is running OK by default. I ran http://cobra.mycompany.com
from another machine, and it displays OK. But when I type
http://cobra.mycompany.com/petview, I get a 404. I am sure that I am
doing wrong. I want to learn how to set this kind of settings. Please
advice.

Thank you,
Nagu

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django on mod_python... Admin interface, no styling...

2008-05-03 Thread Abdallah El Guindy

Thanks... that solved it!

On May 3, 6:22 pm, jonknee <[EMAIL PROTECTED]> wrote:
> > I tried deploying my django project on apache+modpython as the
> > tutorial described... Everything works fine except that the admin
> > website displays unformatted ... (could not manage to find the
> > stylesheet somehow), can anyone tell me what went wrong?
>
> See "Serving the admin files" in the mod_python Django installation
> instructions
>
> http://www.djangoproject.com/documentation/modpython/
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django on mod_python... Admin interface, no styling...

2008-05-03 Thread jonknee

> I tried deploying my django project on apache+modpython as the
> tutorial described... Everything works fine except that the admin
> website displays unformatted ... (could not manage to find the
> stylesheet somehow), can anyone tell me what went wrong?

See "Serving the admin files" in the mod_python Django installation
instructions

http://www.djangoproject.com/documentation/modpython/

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django on mod_python... Admin interface, no styling...

2008-05-03 Thread Abdallah El Guindy

Hey all

I tried deploying my django project on apache+modpython as the
tutorial described... Everything works fine except that the admin
website displays unformatted ... (could not manage to find the
stylesheet somehow), can anyone tell me what went wrong?

Thanks
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: setting up a new django site (mod_python)

2008-01-14 Thread Ariel Mauricio Nunez Gomez
>
> the path to the actual project itself is located at /home/www/
> django..com/htdocs/mysite/


There it is. It is generally not a good idea to put your project's files on
a public folder (htdocs , www) for security reasons.
The short advice, without knowing all the other details on your server
setup, is to add the following line before the  tag.

PyhtonPath "['/home/www/django..com/htdocs']+sys.path"

Assuming your project is named "mysite". (Hint: check if there exists the
/home/www/django.XXX.com/htdocs/mysite/settings.py file )

Regards,
Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: setting up a new django site (mod_python)

2008-01-14 Thread comike01


sure, though I'd prefer to obscure some information with , but
every time that is used it is for the same piece of text.  The
information I have as of now is as such:

in my apache httpd.conf file:

   setHandler python-program
   PythonHandler django.core.handlers.modpython
   SetEnv DJANGO_SETTINGS_MODULE mysite.settings
   PythonDebug On


the path to the actual project itself is located at /home/www/
django..com/htdocs/mysite/

Is this the appropriate information? I am still VERY new to all this
and may be missing what is being said.  Thanks!



On Jan 14, 12:12 pm, "Ariel Mauricio Nunez Gomez"
<[EMAIL PROTECTED]> wrote:
> comike01,
>
> 1. Please post the whole django-related config you have on apache.
> 2. Tell us what's the name of your project and where it is located on your
> filesystem.
>
> I really don't think the problem is related to the settings value, instead
> it must be a path configuration problem as Karen suggests.
>
> Ariel.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: setting up a new django site (mod_python)

2008-01-14 Thread Ariel Mauricio Nunez Gomez
comike01,

1. Please post the whole django-related config you have on apache.
2. Tell us what's the name of your project and where it is located on your
filesystem.

I really don't think the problem is related to the settings value, instead
it must be a path configuration problem as Karen suggests.

Ariel.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: setting up a new django site (mod_python)

2008-01-14 Thread comike01

I beleive I had this set correctly, except for one problem, this line
from the documentation:

 SetEnv DJANGO_SETTINGS_MODULE mysite.settings

Im not sure what mysite.settings should be set to.  Is there a way I
can detect what these values should be?

Thanks!


On Jan 11, 11:47 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> Sorry, I now see you did indicate your server in the subject -- mod_python,
> and I just didn't see that.  So, the next question is did you add the
> location of your Django project to the PythonPath setting for your site as
> described here:
>
> http://www.djangoproject.com/documentation/modpython/
>
> Specifics on what you have specified in the apache config and where your
> settings file resides could help in providing more detailed help.
>
> Karen
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: setting up a new django site (mod_python)

2008-01-11 Thread Karen Tracey
Sorry, I now see you did indicate your server in the subject -- mod_python,
and I just didn't see that.  So, the next question is did you add the
location of your Django project to the PythonPath setting for your site as
described here:

http://www.djangoproject.com/documentation/modpython/

Specifics on what you have specified in the apache config and where your
settings file resides could help in providing more detailed help.

Karen

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: setting up a new django site (mod_python)

2008-01-11 Thread Karen Tracey
On Jan 11, 2008 6:31 PM, comike01 <[EMAIL PROTECTED]> wrote:

>
> I am having a disastrous time trying to set up a new django site on my
> server.  Every time I restart my server with it enabled I get
> something along the lines of
> "  File "/usr/local/lib/python2.4/site-packages/django/core/handlers/
> base.py", line 27, in load_middleware
>for middleware_path in settings.MIDDLEWARE_CLASSES:
>
>  File "/usr/local/lib/python2.4/site-packages/django/conf/
> __init__.py", line 28, in __getattr__
>self._import_settings()
>
>  File "/usr/local/lib/python2.4/site-packages/django/conf/
> __init__.py", line 59, in _import_settings
>self._target = Settings(settings_module)
>
>  File "/usr/local/lib/python2.4/site-packages/django/conf/
> __init__.py", line 87, in __init__
>raise ImportError, "Could not import settings '%s' (Is it on
> sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE,
> e)
>
> ImportError: Could not import settings 'mysite.settings' (Is it on
> sys.path? Does it have syntax errors?): No module named
> mysite.settings"
>
> I'm sure this problem has to do with me using default settings still,
> but I don't know what to change them to.  Any advice would be much
> appreciated.
>

You don't say what server you are trying to start.  Apache with mod_python?
The development server?  Something else?  The problem looks to be that your
server cannot locate your settings file -- it is probably not on the Python
path for the server.  But without knowing what server you are using, it is
hard to give guidance on how to fix it.  Note the docs do cover settings for
deployment, search for "Deployment" here:

http://www.djangoproject.com/documentation/

Karen

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



setting up a new django site (mod_python)

2008-01-11 Thread comike01

I am having a disastrous time trying to set up a new django site on my
server.  Every time I restart my server with it enabled I get
something along the lines of
"  File "/usr/local/lib/python2.4/site-packages/django/core/handlers/
base.py", line 27, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:

  File "/usr/local/lib/python2.4/site-packages/django/conf/
__init__.py", line 28, in __getattr__
self._import_settings()

  File "/usr/local/lib/python2.4/site-packages/django/conf/
__init__.py", line 59, in _import_settings
self._target = Settings(settings_module)

  File "/usr/local/lib/python2.4/site-packages/django/conf/
__init__.py", line 87, in __init__
raise ImportError, "Could not import settings '%s' (Is it on
sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE,
e)

ImportError: Could not import settings 'mysite.settings' (Is it on
sys.path? Does it have syntax errors?): No module named
mysite.settings"

I'm sure this problem has to do with me using default settings still,
but I don't know what to change them to.  Any advice would be much
appreciated.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Mac OS X 10.4 + Python 2.4.3 + Django + Apache2 + mod_python

2007-10-04 Thread Graham Dumpleton

On Oct 4, 6:35 pm, dstuart <[EMAIL PROTECTED]> wrote:
> Just a quick note to say mod_wsgi does support Apache 2 from the site:
>
> "The mod_wsgi package can be compiled for and used with either Apache
> 1.3, 2.0 or 2.2 on UNIX systems (including Linux), as well as Windows.
> Either the single threaded 'prefork' or multithreaded 'worker' Apache
> MPMs can be used when running on UNIX.
>
> Daemon mode of mod_wsgi will however only be available on Apache 2.0
> or 2.2 running on UNIX, and only when the Apache runtime library
> underlying Apache has been compiled with support for threading.
>
> Python 2.3 or later is required and Python must have been compiled
> with support for threading. "

FWIW, the reason I suggested that OP not use mod_python is because
when they first came to me it was about getting mod_python 2.7.11
working on MacOS X with Apache 1.3. To do this requires various
patches to be made to mod_python source code otherwise it will crash
when used. Thus the advice was based on them using Apache 1.3. It
looks like that they later decided to upgrade to Apache 2.X after I
had talked to them. Using mod_wsgi as I suggested was a way around the
need to patch old mod_python to get it working on MacOS X/Apache 1.3,
with mod_wsgi working on all major versions of Apache and Mac OS X as
is. So, bit of context was missing in the original post.

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-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Mac OS X 10.4 + Python 2.4.3 + Django + Apache2 + mod_python

2007-10-04 Thread dstuart

Just a quick note to say mod_wsgi does support Apache 2 from the site:

"The mod_wsgi package can be compiled for and used with either Apache
1.3, 2.0 or 2.2 on UNIX systems (including Linux), as well as Windows.
Either the single threaded 'prefork' or multithreaded 'worker' Apache
MPMs can be used when running on UNIX.

Daemon mode of mod_wsgi will however only be available on Apache 2.0
or 2.2 running on UNIX, and only when the Apache runtime library
underlying Apache has been compiled with support for threading.

Python 2.3 or later is required and Python must have been compiled
with support for threading. "


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Mac OS X 10.4 + Python 2.4.3 + Django + Apache2 + mod_python

2007-09-24 Thread Leo

I just went through getting set up for testing my Django apps under
mod_python as well as the test server.  For the sake any other users
trying to sort through this on Mac OS X, I thought I'd post what
finally worked for me (YMMV).  I assume you have a Django app working
under the test server, and you want to do what you think will be the
simple (haha) process of testing it under Apache locally.

Step 1: DevTools
We're going to be compiling from source.  This means you must have a
recent copy of OS X DevTools installed.  If you don't, go to
http://developer.apple.com/tools/ and download the newest fully-
released version (2.4 as of right now).  Fortunately, I already had
Xcode all set up.

Step 2: Apache 2.0
If you want to test Django under mod_python, you're going to need to
upgrade to Apache 2.0 instead of the Apache 1.3 you currently have, as
mentioned here:

http://www.djangoproject.com/documentation/install/#install-apache-and-mod-python.

After looking at a few options, I concluded right now compiling from
source was the best option, none of the packaged updates seem to be up-
to-date right now with the latest security patches.  Luckily, Apache
is a *very* clean build.  Download a 2.X version (as of this writing,
it's 2.2.6) from an apache.org mirror.  Then, look at the excellent
description of a Mac OS X setup for Apache here:
http://switch.richard5.net/isp-in-a-box-v2/installing-apache-on-mac-os-x/
Note that if you're using csh or tcsh instead of BASH, the first
command to set up your CFLAGS should be:
 setenv CFLAGS "-arch i386 -isysroot /Developer/SDKs/
MacOSX10.4u.sdk"
instead of the bash syntax he's showing.

Step 3: mod_python
This was the most time-consuming part for me.  It starts out easy,
just download mod_python 3.x source from http://www.modpython.org/
(right now the released version is 3.3.1).  Unpack as usual.

The first step is to be sure to tell the configure program where your
Apache 2 installation is; if you followed the suggestions above it's
in /Library/Apache2.  So with just that, your configure command will
be:
./configure --with-apxs=/Library/Apache2/bin/apxs

If you're using the Mac OS 10.4 default Python installation (2.3.5)
which is installed as a Framework in /Library/Frameworks, you can
continue to step 4 from there.  However, I had upgraded to Python
2.4.3 and to remain version-locked with some other machines I really
wanted to keep using it.  This caused two complications.  The first
was to tell configure where my Python was, so my configure command
was:
./configure --with-apxs=/Library/Apache2/bin/apxs --with-python=/
usr/local/bin/python
That gets you through the configure, but it turns out to not quite
work.  If you build, install, and run the mod_python from there, when
you launch Apache you'll get an error in the error_log to this effect,
and mod_python is useless:
[Mon Sep 24 13:21:56 2007] [error] python_init: Python version
mismatch, expected '2.4.3', found '2.3.5'.

Fortunately, Graham Dumpleton was nice enough to help me out, and
pointed out that after running configure but before running "make dso"
you need to edit the generated Makefile in src/Makefile.  He has a
note about this on his page at
http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX
For me, since I had Python 2.4.3 installed in /Library/Frameworks, the
LDFLAGS line became this:

LDFLAGS= -Wl,-F/Library/Frameworks  -u _PyMac_Error /Library/
Frameworks/Python.framework/Versions/2.4/Python   -arch ppc -arch i386
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -g

Step 4: Go Back to Work on your App!
Whew!  At that point, I finished compiling and installing mod_python,
then got to configuring my httpd.conf to reference mod_python, and
then finally got back to actually making my Django app work ;-)

Leo

P.S.  I should also point out that Graham advised not using mod_python
at all, and using mod_wsgi, which is supposed to work with the stock
Apache 1.3 and python 2.3.5.  My ultimate deployment server uses
Apache 2 so I stuck with the above, but for the sake of others I'll
pass along the reference I got:
  http://www.modwsgi.org
  http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
  http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django and mod_python issues

2006-12-08 Thread Jeremy Dunck

On 12/8/06, brandon <[EMAIL PROTECTED]> wrote:
>
> Hi I'm using the same setup. However I'm pretty new to python and
> django.

Which django version/revision are you using?

> I have C:\Program Files\xampp\htdocs as my default directory
>
> Where should I place django?

Somewhere on the python path.  :)

The usual approach is to either place it in site-packages or to place
a .pth file in site-packages, and then point the .pth to where ever
Django is.

Let's go the .pth route.

In the python terminal, do this:

import sys
print sys.path

That'll result in a list of directories, one of which is
"site-packages", probably something like this:

C:\python25\lib\site-packages\

In that directory, create a simple text file named .pth
file.  django.pth probably is sensible.

In the .pth file, place the path to wherever Django exists on your
filesystem.  As an example, if you downloaded Django-0.95.tar.gz and
unzipped it into C:\Django-0.95\, then you'll want to put that in your
.pth

When python starts up, it starts with a simple sys.path, then adds
paths in the PYTHONPATH variable, plus any directories listed in .pth
files found on those paths.

When you code:
import django
what happens is, python looks for a package (that is, a .py file) or a
module (that is, a directory which contains an __init__.py file) named
"django" in any of the directories listed in sys.path, in order.

By adding django.pth to your site-packages directory (which is
included in the base sys.path list), you add C:\Django-0.95 (or
whatever dir you listed) to the sys.path list.

Then, when you run "import django", it finds the module "django"
within that dir.

The Python tutorial is surprisingly weak in this area, but if you
haven't read that, it's a good place to get started with Python.
http://docs.python.org/tut/tut.html

If you already know how to program, you'll also want to look at
http://diveintopython.org

Cheers,
  Jeremy

--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django and mod_python issues

2006-12-08 Thread brandon

Hi I'm using the same setup. However I'm pretty new to python and
django.

I have C:\Program Files\xampp\htdocs as my default directory

Where should I place django?

I placed it in C:\Program Files\xampp\htdocs\python\

but can't get the 'import django' working properly... sadly i have to
use windows.

Thanks for the help.

B

On Dec 5, 10:31 am, "Tipan" <[EMAIL PROTECTED]> wrote:
> Thanks for the advice. Adding the line:
>
> PythonPath "['d:/program files/xampp/htdocs'] + sys.path"
>
> to my httpd.conf overcame the issue with loading myproject module.
> Simple when you know how.
> 
> Thanks again, Tim


--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django and mod_python issues

2006-12-05 Thread Tipan

Thanks for the advice. Adding the line:

PythonPath "['d:/program files/xampp/htdocs'] + sys.path"

to my httpd.conf overcame the issue with loading myproject module.
Simple when you know how.

Thanks again, Tim


--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django and mod_python issues

2006-12-05 Thread Waylan Limberg

On 12/5/06, Nicolas Steinmetz <[EMAIL PROTECTED]> wrote:
>
> Tipan a écrit :
>
> > PythonPath "['d:/program files/xampp/htdocs/myproject'] + sys.path"
>
> Try : PythonPath "['d:/program files/xampp/htdocs/'] + sys.path"

Actually, you may want to include both lines. That way,
`myproject.settings` will still work and you will be able to `import
myapp` instead of `import myproject.myapp` making your apps more
portable across projects.


-- 

Waylan Limberg
[EMAIL PROTECTED]

--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django and mod_python issues

2006-12-05 Thread Nicolas Steinmetz

Tipan a écrit :

> PythonPath "['d:/program files/xampp/htdocs/myproject'] + sys.path"

Try : PythonPath "['d:/program files/xampp/htdocs/'] + sys.path"

Nicolas


--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django and mod_python issues

2006-12-05 Thread Jeremy Dunck

On 12/5/06, Tipan <[EMAIL PROTECTED]> wrote:
...
> EnvironmentError: Could not import settings 'myproject.settings' (Is it
> on sys.path? Does it have syntax errors?): No module named
> myproject.settings
...
> PythonPath "['d:/program files/xampp/htdocs/myproject'] + sys.path"

> Can anyone give me any pointers for resolving this behaviour?
>

I think you want this:

PythonPath "['d:/program files/xampp/htdocs/'] + sys.path"

(I don't think this has anything to do with Py2.5, etc.  It's just
python path issues.  :)

--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django and mod_python issues

2006-12-05 Thread Tipan

I've seen various posts with similar problems, but not managed to find
consistent advice on trouble shooting this issue.

I've got an installation of xampp Apache 2.2 and mod_python 3.2.10 and
Python 2.5. Running on Windows 2003 server.

I have mod_python working fine in apache - I can view the contents of a
simple python file (mptest from mod_python testing).

I installed Django -  I did this from the latest files via Subversion,
because the install file on Official version failed several times (the
note said Python 2.5 may cause problems)

I've added details of my project file in a location statement to
httpd.conf.

However, when I open the project in the browser:
http://localhost:/myproject/

I get the following error(s) displayed in the browser:
---
Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

  File "D:\Python25\Lib\site-packages\mod_python\apache.py", line 299,
in HandlerDispatch
result = object(req)

  File
"D:\Python25\lib\site-packages\django\core\handlers\modpython.py", line
177, in handler
return ModPythonHandler()(req)

  File
"D:\Python25\lib\site-packages\django\core\handlers\modpython.py", line
145, in __call__
self.load_middleware()

  File "D:\Python25\lib\site-packages\django\core\handlers\base.py",
line 22, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:

  File "D:\Python25\lib\site-packages\django\conf\__init__.py", line
27, in __getattr__
self._import_settings()

  File "D:\Python25\lib\site-packages\django\conf\__init__.py", line
54, in _import_settings
self._target = Settings(settings_module)

  File "D:\Python25\lib\site-packages\django\conf\__init__.py", line
82, in __init__
raise EnvironmentError, "Could not import settings '%s' (Is it on
sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)

EnvironmentError: Could not import settings 'myproject.settings' (Is it
on sys.path? Does it have syntax errors?): No module named
myproject.settings
--
My httpd.conf file has the following settings at the end:
--

  AllowOverride FIleinfo
  AddHandler mod_python .py
  PythonHandler mptest
  PythonDebug On




SetHandler python-program
PythonPath "['d:/program files/xampp/htdocs/myproject'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
PythonDebug On

--
I've checked the "import django" from the python command line and there
were no errors, so I believe it's installed and accessible.

I've tried manually adding to sys.path the directories of the django
installation and my project with no effect. I'm wondering whether by
manually installing the django files from subversion I missed some key
settings, but I've not found any notes to allow me to check.

Can anyone give me any pointers for resolving this behaviour?


--~--~-~--~~~---~--~~
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: A combined django + apache + mod_python distro

2006-08-31 Thread Iwan Memruk
Now... I believe that coupling it with Linux would be too much. But building a Django + Apache distro is realistic enough.By the way, what about an Eclipse plugin for Django?Actually what I imagine is a 
RadRails-style package.On 8/31/06, Frank Stüss <[EMAIL PROTECTED]> wrote:
I am dreaming of a www.colinux.org package with this configuration.May be this would be nice, too. Or Linux on a stick as django server to handout a customer specific offline catalogue on a nifty usb-stick (*sigh*).
Am Donnerstag, 31. August 2006 10:31 schrieb Iwan Memruk:> Another question: is there something that prevents distributing a full> pre-configured environment for Django, including Apache and mod_python?
> Looks like the licensing for each of the three projects allows that. Such a> distro would be very appealing to the users and it would fit the RAD> ideology of Django. What do you guys think?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---



Re: A combined django + apache + mod_python distro

2006-08-31 Thread Frank Stüss

I am dreaming of a www.colinux.org package with this configuration. 
May be this would be nice, too. Or Linux on a stick as django server to hand 
out a customer specific offline catalogue on a nifty usb-stick (*sigh*).



Am Donnerstag, 31. August 2006 10:31 schrieb Iwan Memruk:
> Another question: is there something that prevents distributing a full
> pre-configured environment for Django, including Apache and mod_python?
> Looks like the licensing for each of the three projects allows that. Such a
> distro would be very appealing to the users and it would fit the RAD
> ideology of Django. What do you guys think?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



A combined django + apache + mod_python distro

2006-08-31 Thread Iwan Memruk
Another question: is there something that prevents distributing a full pre-configured environment for Django, including Apache and mod_python? Looks like the licensing for each of the three projects allows that. Such a distro would be very appealing to the users and it would fit the RAD ideology of Django. What do you guys think?
-- Iwan

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: django/apache/mod_python

2006-05-19 Thread liudmila

Hello Alexandre,
thanks for the help. Now I am trying to correct.
With regards
 Liudmila


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: django/apache/mod_python

2006-05-19 Thread Alexandre CONRAD

>   1. the pretty django layout disappears;

It's something about the medias path (templates, css) for the admin. 
This should help:

   http://www.djangoproject.com/documentation/static_files/

>   2. now it is not possible to save the date in a database
> (Mysql, version 4.0.24)

I can't help you on this one.

Regards,
-- 
Alexandre CONRAD - TLV
Research & Development
tel : +33 1 30 80 55 05
fax : +33 1 30 80 55 06
6, rue de la plaine
78860 - SAINT NOM LA BRETECHE
FRANCE


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



django/apache/mod_python

2006-05-19 Thread Lioudmila Belenkaia

 Hi GoogleGroups,
I am running django (version 0.91) on the locale computer.
 It works fine.
 Now our group needs to have it working with Apache and
 mod_python on a production server. Apache 2.2/mod_python
 3.3 are installed and the file http.conf is edited
 according to the
 documentaiion "How to use Django with mod_python".
 But after istalling Apache/mod_python, django on a
 production server runs wrong:
  1. the pretty django layout disappears;
  2. now it is not possible to save the date in a database
(Mysql, version 4.0.24)
  I have no ideas where to look for the problem.
 What is wrong ?
 Please help me. 
 I thank you in advance.
 With regards
 Liudmila Belenkaia.
 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: django with mod_python

2006-03-10 Thread limodou

On 3/11/06, Gacha <[EMAIL PROTECTED]> wrote:
>
> There is all my virtualhost config:
>
> 
> DocumentRoot /home/gacha
> ServerName gacha.id.lv
> ServerAlias www.gacha.id.lv
> ServerAdmin [EMAIL PROTECTED]
>
> 
> AllowOverride All
> Options None
> Order allow,deny
> Allow from all
> 
>
> 
> SetHandler mod_python
> PythonPath "['/']"

You should set PythonPath as :

"['D:/your_django_project_parent_directory'] + sys.path"

> PythonHandler django.core.handlers.modpython
> SetEnv DJANGO_SETTINGS_MODULE poll.settings
> PythonDebug On
> PythonAutoReload On
> 
> 


--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: django with mod_python

2006-03-10 Thread Gacha

There is all my virtualhost config:


DocumentRoot /home/gacha
ServerName gacha.id.lv
ServerAlias www.gacha.id.lv
ServerAdmin [EMAIL PROTECTED]


AllowOverride All
Options None
Order allow,deny
Allow from all



SetHandler mod_python
PythonPath "['/']"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE poll.settings
PythonDebug On
PythonAutoReload On


--
But I get error:
--
Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
287, in HandlerDispatch
log=debug)

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
454, in import_module
f, p, d = imp.find_module(parts[i], path)

ImportError: No module named django
--
In python console I can import django, seems, that apache can't, but
why?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



django with mod_python

2006-03-09 Thread Gacha

If I write:

SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath "['/home/gacha/poll'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
PythonDebug On


then I get error: EnvironmentError: Could not import
DJANGO_SETTINGS_MODULE

But when I change:
PythonPath "['/home/gacha/poll'] + sys.path"
to:
PythonPath "['/home/gacha/poll']"

then I get this:

Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 287,
in HandlerDispatch
log=debug)

File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 454,
in import_module
f, p, d = imp.find_module(parts[i], path)

ImportError: No module named django


How to get this to work?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Help running Django with mod_python

2005-12-02 Thread Paolo

2005/12/2, frank h. <[EMAIL PROTECTED]>:
>
> hej paolo,
> I am on OS X as well, and I had problems with Apache and mod_python.

Hi frank, I'm not running OS X! I looked at django's documentation and
at http://cavedoni.com/2005/django-osx, as you suggested, but even
trying a bunch of different "variations", I've not yet achieved a
working setup. In the meanwhile I'm asking to mod_python's people.

Thanks for help


Re: Help running Django with mod_python

2005-12-02 Thread Paolo

2005/12/1, Bryan Murdock <[EMAIL PROTECTED]>:

> Do you have mod_php running too?  See this:
>
> http://www.modpython.org/pipermail/mod_python/2004-January/014886.html

No mod_php installed! I already checked that (and this faq gives an
explanation about mod_php and mod_python incompatibilities in some
circumstances, http://www.modpython.org/FAQ/faqw.py?req=show=faq02.013.htp)

>
> Bryan

Thanks


Re: Help running Django with mod_python

2005-12-02 Thread Paolo

2005/12/1, Afternoon <[EMAIL PROTECTED]>:
> Have you tried adding PythonDebug On to your httpd.conf? Also, I'm
> using SetHandler python-program, no idea if that makes any difference
> though.

Yes, PythonDebug is On, and to increase verbosity LogLevel is set to
value debug.

For mod_python 3.1, it is preferred to use mod_python, as
python-program is the old name (that is still supported). With
mod_python 2.7 instead it is mandatory to use python-program.


Re: Help running Django with mod_python

2005-12-01 Thread Bryan Murdock

On 12/1/05, Paolo <[EMAIL PROTECTED]> wrote:
>
> I'm trying to setup Django with Apache and mod_python.
>
> I have followed the procedure described in the document "how to use
> Django with mod_python", but I can't obtain a working basic (single
> Django installation on the same Apache) environment, because Apache
> unexpectedly crashes at each request.

Do you have mod_php running too?  See this:

http://www.modpython.org/pipermail/mod_python/2004-January/014886.html

Bryan


Re: Help running Django with mod_python

2005-12-01 Thread Afternoon




This make me think that
apache/mod_python/python installation is fine and that the problem is
in httpd.conf or in my project.


The fact that the child process is dying suggests something fairly  
low-level, but if you have another MP handler that works OK that's a  
bit strange. I always had either one or the other. Although I confess  
I didn't test another handler, I did start getting stack traces when  
I fixed a few bits.


Have you tried adding PythonDebug On to your httpd.conf? Also, I'm  
using SetHandler python-program, no idea if that makes any difference  
though.



Afternoon, man about the Internet -- http://aftnn.org/




Re: Help running Django with mod_python

2005-12-01 Thread Paolo

2005/12/1, Afternoon <[EMAIL PROTECTED]>:
>
> What platform are you building on? Where is your Python? I had to
> define PYTHONHOME = /usr/ in envopts for Apache because I'm running
> OS X and my Python is stock but my Apache comes from the Fink project.
>
> Is there any way that Apache might not be able to find Python such as
> this?

Well, my experiments take place on linux slackware, kernel 2.4.26.
Running a simple mod_python test handler, like the one to test if
mod_python installation has completed succesfully
(http://www.modpython.org/live/current/doc-html/inst-testing.html),
happens without problems. This make me think that
apache/mod_python/python installation is fine and that the problem is
in httpd.conf or in my project.

So I'll post them. This is the relevant part of httpd.conf:

DocumentRoot /home/paolo/projects/django

SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath ['/home/paolo/projects/django']+sys.path
SetEnv DJANGO_SETTINGS_MODULE cardano.settings



and this is urlpatterns:
urlpatterns = patterns('',
(r'^admin/', include('django.contrib.admin.urls.admin')),
)

Project cardano lives in /home/paolo/projects/django

Thanks


Re: Help running Django with mod_python

2005-12-01 Thread Afternoon



On 1 Dec 2005, at 15:24, Paolo wrote:


Hi Afternoon, not only I have restarted Apache after building
mod_python (3.1.4), I also have updated it from version 2.0.54 to
2.0.55, but nothing has changed.


Hang on, it's coming back to me now (sorry, it was a long night).

What platform are you building on? Where is your Python? I had to  
define PYTHONHOME = /usr/ in envopts for Apache because I'm running  
OS X and my Python is stock but my Apache comes from the Fink project.


Is there any way that Apache might not be able to find Python such as  
this?



Afternoon, man about the Internet -- http://aftnn.org/




Re: Help running Django with mod_python

2005-12-01 Thread Afternoon



On 1 Dec 2005, at 14:29, Paolo wrote:


[Thu Dec 01 11:07:13 2005] [notice] child pid 15299 exit signal
Segmentation fault (11)


Ah, I spent a frustrating few hours wrestling with this error (or one  
like it) last night. Are you using mod_python 3? After building  
mod_python have you fully restarted Apache or just gracefully  
restarted it?



Afternoon, man about the Internet -- http://aftnn.org/