Using web2py with werkzeug?

71 views
Skip to first unread message

lillian

unread,
Nov 24, 2015, 1:56:52 AM11/24/15
to web2py-users
Hello,

I have an existing web2py app that I want to run behind mezzanine (the django CMS).  Meaning, mezzanine would provide the landing page/blog/etc. and after logging in the content would be provided by the web2py app.  On another forum it was recommended that I use werkzeug's DispatcherMiddleware to combine the two apps so I can run them together.

Are there any guidelines/recommendations for doing this with web2py?  

Thanks!

Richard Vézina

unread,
Nov 24, 2015, 10:12:27 AM11/24/15
to web2py-users
I guess not... I am not sure why werkzeug's would help... To me to you only need to configure your web server correctly (regular expression) in order that url starting by the name of your web2py app (www.domain.org/web2pyapp/...) directed to web2py instead than Django... I don't know what is the "default" middleware that Django suggest, I know that web2py is use a lot with uwsgi... I guess you may requires 2 differents middleware to prevent conflict...

Richard



--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Massimo Di Pierro

unread,
Nov 25, 2015, 1:40:14 PM11/25/15
to web2py-users
Hello Lilian,

you do not need any middleware but this can be tricky. You need to configure the web server (nginx? apache?) to map some URLs into mezzanine and some into web2py.

The problem is if they login into mezzanine and then go to a web2py page, how are user credential transferred? I can think of many ways to do this but all require coding and some form of data exchange between Django and Mezzanine (JWT? Cookies? Shared database?). If Mezzanine support Cas or OAuth, then you can have web2py plug into those.
Reply all
Reply to author
Forward
0 new messages