Re: migrating to mod_wsg
Martijn Moeling <[email protected]> Mon, 1 Mar 2010 18:58:09 +0100
| Newsgroups | gmane.comp.python.mod_python |
|---|---|
| Message-ID | <[email protected]> |
--===============0148482746== Content-Type: multipart/alternative; boundary=Apple-Mail-10--751203224 --Apple-Mail-10--751203224 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Lu/Ruben and others. Some things I am working on... I have set up a SourceForge project called "mptomwsgi" and it can be = found on http://mptomwsgi.sourceforge.net Please be patient, it has a CVS but no code uploaded yet. I have to do some work on the Session.Py since I forgot to mention I use = SQLAclhemy and my mptomwsgi version is using that. The nice thing about SQLAlchemy (Database to Object mapper) is that it = works on any Python DBAPI compatibe database. I have a MySQL Session = object added to the original version too but that one is dependent on MP = for now, I have to merge the two. At this point I have a seemingly good working Req object, with support = for register_cleanup. I have no real Python package yet, and this adapter CANNOT be installed = when Mod_Python is on the system since you will have to copy the files = to the: python/site-packages/mod_python directory (for code = compatibility) you will get a sample index.wsgi and there you will have to do: import = your_original_module_with_handler as app. Can you (Lu/Ruben) send me a message with what parts of MP you use and = what OS you are on so I can work out what I have to do to help you with = reasonable documentation? Some hints: Authentication stuff from mod_python.util like fieldstorage (which might just work, I = just do not know at the moment) Are you using SQLAlchemy? etc. Be aware that I do not have looked into publisher (never ever used it), = I have to bother Graham with that but for now I will not support that. Updates will follow soon! Martijn On Mar 1, 2010, at 10:18 AM, Lu wrote: > Great! > Thanks for your time, > luca >=20 > On Mon, Mar 1, 2010 at 12:29 AM, Martijn Moeling <[email protected]> = wrote: > Please give me some time to build instructions and a zip file, I'm = extremely busy until next wednesday, I hope i can find the time to get = it done in between! >=20 > On Feb 25, 2010, at 12:08 PM, Lu wrote: >=20 >> I have written an adapter for mod_wsgi which is code compatible for = Mod_python programs. >> My mod_python CMS runs now on top of mod_wsgi without any changes to = the code. >>=20 >> It is really small and consists of one index.wsgi to created the req = object and call the handler and a "fake" python package for the = apache.py, Session.Py, Cookie.py etc. (I did need to change some stuff = in there) >> I did this for my own use since I like the Req object and to pass it = around, so my code is very dependent on MP. I have completely turned = over Session.Py for my own session management which stores in MySQL and = has License stuff etc. >>=20 >> I consider it Beta since I am the only one running it and do not = touch all the code. >>=20 >> This code is free to use by anybody (Be aware it should be GPL or = so). At the moment there is no CVS or License simply because I do not = have the time to set stuff like that up (never did that before). I just = started coding Python with Eclipse and Pydev as preparation on starting = CVS use. >>=20 >> Drop me an email if u r interested I'll help you out using email/MSN = Messenger/Skype etc >>=20 >> Hi Martijn, >> I'm interested in your code, can you please sent to me a copy ? >> thanks, >> luca >=20 >=20 --Apple-Mail-10--751203224 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii <html><head></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; = ">Lu/Ruben and others.<div><br></div><div>Some things I am working = on...</div><div><br></div><div>I have set up a SourceForge project = called "mptomwsgi" and it can be found on <a = href=3D"http://mptomwsgi.sourceforge.net">http://mptomwsgi.sourceforge.net= </a></div><div>Please be patient, it has a CVS but no code uploaded = yet.</div><div><br></div><div>I have to do some work on the Session.Py = since I forgot to mention I use SQLAclhemy and my mptomwsgi version is = using that.</div><div>The nice thing about SQLAlchemy (Database to = Object mapper) is that it works on any Python DBAPI compatibe database. = I have a MySQL Session object added to the original version too but that = one is dependent on MP for now, I have to merge the = two.</div><div><br></div><div>At this point I have a seemingly good = working Req object, with support for register_cleanup.</div><div>I have = no real Python package yet, and this adapter CANNOT be installed when = Mod_Python is on the system since you will have to copy the files to = the: python/site-packages/mod_python directory (for code = compatibility)</div><div><br></div><div>you will get a sample index.wsgi = and there you will have to do: import your_original_module_with_handler = as app.</div><div><br></div><div>Can you (Lu/Ruben) send me a message = with what parts of MP you use and what OS you are on so I can work out = what I have to do to help you with reasonable = documentation?</div><div>Some = hints:</div><div>Authentication</div><div>stuff from mod_python.util = like fieldstorage (which might just work, I just do not know at the = moment)</div><div>Are you using = SQLAlchemy?</div><div>etc.</div><div><br></div><div>Be aware that I do = not have looked into publisher (never ever used it), I have to bother = Graham with that but for now I will not support = that.</div><div><br></div><div>Updates will follow = soon!</div><div><br></div><div>Martijn</div><div><br></div><div><br></div>= <div><br></div><div><br></div><div><br></div><div><br><div><div>On Mar = 1, 2010, at 10:18 AM, Lu wrote:</div><br = class=3D"Apple-interchange-newline"><blockquote = type=3D"cite"><div>Great!</div><div>Thanks for your = time,</div><div>luca</div><div><br><div class=3D"gmail_quote">On Mon, = Mar 1, 2010 at 12:29 AM, Martijn Moeling <span dir=3D"ltr"><<a = href=3D"mailto:[email protected]">[email protected]</a>></span> = wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 = .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div = style=3D"word-wrap:break-word">Please give me some time to build = instructions and a zip file, I'm extremely busy until next wednesday, I = hope i can find the time to get it done in between!<div> <div></div><div class=3D"h5"><div><br><div><div>On Feb 25, 2010, at = 12:08 PM, Lu wrote:</div><br><blockquote type=3D"cite"><blockquote = class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> I have written an adapter for mod_wsgi which is code compatible for = Mod_python programs.</blockquote><blockquote class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> My mod_python CMS runs now on top of mod_wsgi without any changes to the = code.</blockquote><blockquote class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> <br></blockquote><blockquote class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> It is really small and consists of one index.wsgi to created the req = object and call the handler and a "fake" python package for the = apache.py, Session.Py, Cookie.py etc. (I did need to change some stuff = in there)</blockquote> <blockquote class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> I did this for my own use since I like the Req object and to pass it = around, so my code is very dependent on MP. I have completely turned = over Session.Py for my own session management which stores in MySQL and = has License stuff etc.</blockquote> <blockquote class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> <br></blockquote><blockquote class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> I consider it Beta since I am the only one running it and do not touch = all the code.</blockquote><blockquote class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> <br></blockquote><blockquote class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> This code is free to use by anybody (Be aware it should be GPL or so). = At the moment there is no CVS or License simply because I do not have = the time to set stuff like that up (never did that before). I just = started coding Python with Eclipse and Pydev as preparation on starting = CVS use.</blockquote> <blockquote class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> <br></blockquote><blockquote class=3D"gmail_quote" = style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0,8= ex;border-left-width:1px;border-left-color:rgb(204, 204, = 204);border-left-style:solid;padding-left:1ex"> Drop me an email if u r interested I'll help you out using email/MSN = Messenger/Skype etc</blockquote><div><br></div><div>Hi = Martijn,</div><div>I'm interested in your code, can you please sent to = me a copy ?</div> <div> thanks,</div><div>luca</div> = </blockquote></div><br></div></div></div></div></blockquote></div><br></di= v> </blockquote></div><br></div></body></html>= --Apple-Mail-10--751203224-- --===============0148482746== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Mod_python mailing list [email protected] http://mailman.modpython.org/mailman/listinfo/mod_python --===============0148482746==--