Hi Tim,
Well, once someone has setup his app by doing:
python setup.py bdist_egg
And has handed you the egg then all you have to do (assuming you
already have mod_python and the wsgi_gateway) is this:
- Install the egg:
# easy_install helloworld-0.0.0dev-py2.4.egg
- Go to your web directory
# cd /home/httpd/vhosts/domainname.net/httpdocs/
- Create a config:
# paster make-config helloworld hello.ini
- Edit the config file
(change contact info etc... but it should even work when not
changing this file)
- Create a .htaccess containing:
SetHandler mod_python
PythonHandler mod_python.wsgi
PythonPath "['/home/httpd/vhosts/domainname.net/httpdocs/'] +
sys.path"
PythonOption wsgi.application startup::app
PythonOption SCRIPT_NAME /helloworld
- Create 'startup.py' containing:
from paste.deploy import loadapp
app = loadapp("config:/home/httpd/vhosts/domainname.net/httpdocs/
hello.ini")
Your app should now be visible under: http://domainname.net/helloworld
I hope this helps!
Cheers,
Nicholas
On Jul 10, 2006, at 11:38 PM, timc3 wrote:
>
> This is great, just what I am looking for as I am trying to get a
> project that someone else has created working through mod_python and I
> haven't had much time to look at Pylons yet.
>
> One part I am stuck on is in the .ini file that I run from paster
> serve
> mysite.ini says:
>
> [app:main]
> use = egg:mysite
>
> And all the files seem to be under:
> /usr/lib/python2.3/site-packages/mysite.
>
> So what would my options be for:
> PythonPath "['/home/httpd/vhosts/nichol.as/httpdocs/imagesearch'] +
> sys.path"
> PythonOption wsgi.application startup::app
> PythonOption SCRIPT_NAME /imagesearch
>
> Thanks.
>
> Tim.
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss
-~----------~----~----~----~------~----~------~--~---