I am developing a network application in web2py which consists of vertices
and edges. Every vertex has a site which is dynamicalIy created within the
init application. I added a domain and subdomains for my own domain to
routes.py
routers = dict(
# base router
BASE = dict(
I have the following lines of code in routes.py
routers = dict(
# base router
BASE = dict(
domains = {
'domain.com' : 'init',
'www.domain.com' : 'init',
'ldc.domain.com' : 'admin',
'my.domain.com' : 'controlpanel',
}
),
one correction, the \\g's are actually \g
On Fri, Sep 28, 2018 at 12:20 PM Bryan Chance wrote:
> I'm working to switch my web2py application to Python 3. However, I now
> get errors when loading due to my routes.py:
>
> File "/usr/lib/python3.6/sre_parse.py", line 401, in _escape
> raise
I'm working to switch my web2py application to Python 3. However, I now get
errors when loading due to my routes.py:
File "/usr/lib/python3.6/sre_parse.py", line 401, in _escape
raise source.error("bad escape %s" % escape, len(escape))
sre_constants.error: bad escape \g at position 35
My
Hi there. I'm dynamically adding version numbers to the filenames for
static assets like css, js, and image files. (These version numbers aren't
actually in the filenames. They're just added to the url in the and
Hello folks !
Many times when i'm searching for an answer in the official docs about how
to do this or that i'm ending in the stack overflow questions area or in
this group.
and thats really frustrating that even simplest tasks can't be done easy.
For example, how actually routes.py works ?
I created some "widgets" (for lack of a more descriptive name) using the
same pattern as the Auth object. When you call it, it returns a special
function that can respond to several different "sub-functions". This has
been tremendously handy but now I'm encountering a problem -- when I uses
I reinstalled pretty much everything on my Server new OS newest web2py ...
and got my application back and running :-) but web2py uses still the
default routes.py.
when I copied my old routes.py to the web2py root I got an internal server
error. I thought well lets use the example file copied
I have a routes.py file in web2py's home directory which contains the
follwing code:
routes_onerror = [
(r'init/*', r'/error/default/index')
,(r'org/*', r'/error/default/index')
,(r'*/404', r'/error/default/index')
,(r'*/*', r'/error/default/index')
]
# specify action in charge of
Hi everyone,
I know I'm doing something wrong here. I'm trying out app-specific
routes.py files. I have an app that currently has the default/index page
unmodified, that is, it's equivalent to the welcome app.
I have in the web2py base directory the following contents in my routes.py
file:
Hi -
I wanted to change my default application and did some research.
First I did the simple:
```
default_application='p'
default_controller = pkg
default_function = packages
```
And it seemed to work fine but I was not satisfied so I did this:
```
routers = dict(
BASE =
I have web2py deployed behind Apache, and I am using routes:
routers = dict(
# base router
BASE=dict(
default_application='support',
),
)
but it always lands me in support app's controller default I just can't
use other controllers - what am I doing wrong?
--
Resources:
Is it possible to use current.T in routes.py, to recognize an incoming
request based on current.T.current_language and reroute it to the correct
controller / function?
Can you give me an example using pattern-based routing?
--
Resources:
- http://web2py.com
- http://web2py.com/book
I'm getting a URL rewrite glitch.
The scenario: web2py running through IIS using wsgi and published as a
virtual IIS application called TEST.
Therefore the resulting URLs will always need to look like
http://localhost/TEST/welcome/... or http://localhost/TEST/admin/...
The following routes.py
How made Streaming virtual files in Parameter-based system
in routes.py
route_in=(
('.*.(php|PHP|asp|ASP|jsp|JSP)','jammer/default/jam'),
)
I try:
routers = dict(
# base router
BASE=dict(
default_application='ipay',
domains = {
'www.ipo-polza.ru' :
I deployed my app using the nginx script and created a routes.py file like
so:
# -*- coding: utf-8 -*-
routers = dict(
BASE = dict(
default_application='myapp', )
)
However when i go to mywebsite.com i get
invalid request
but mywebsite.com/myapp loads the
Using pattern-based routing, I get Invalid Request messages.
Usually the routes work OK after restarting nginx. But after closing and
restarting Chrome the problem recurs.
The failing url is www.dotzle.com/apps
This is the routes.py file.
I used the nginx setup script. The only change I made
I'm trying to do the simplest routes.py possible. I just want to get rid
of the application name -- EVERYWHERE. In addition, I'd like my main page
(index.html) to just appear without any default controller in the URL.
The problem is, the auth login dialog always includes my application name
Hi Jonathan,
many thanks for the answer:
Here ist mit request object: http://pastie.org/8605943
The URL ist
http://rockiger.com/de/domainfactory/kontoeroeffnunghttp://localhost:8000/de/domainfactory/kontoeroeffnung
.
It seems there is a variable *request.uri_language: de *in that case.
It
On 6 Jan 2014, at 1:17 AM, Rockiger rocki...@googlemail.com wrote:
Hi Jonathan,
many thanks for the answer:
Here ist mit request object: http://pastie.org/8605943
The URL ist http://rockiger.com/de/domainfactory/kontoeroeffnung.
It seems there is a variable request.uri_language: de in
Thanks again,
this is much more than I exspectet. I will look into this, and post back.
Best,
Marco
On Monday, January 6, 2014 4:50:17 PM UTC+1, Jonathan Lundell wrote:
On 6 Jan 2014, at 1:17 AM, Rockiger rock...@googlemail.com javascript:
wrote:
Hi Jonathan,
many thanks for the
Hello together,
I have a problem with routes.py. My goal is it to have a English and a
German (de) version of my site:
I have the following code in there:
routers = dict(
# base router
BASE = dict(
default_application = 'rockiger',
),
rockiger = dict(
On 5 Jan 2014, at 8:44 AM, Rockiger rocki...@googlemail.com wrote:
Hello together,
I have a problem with routes.py. My goal is it to have a English and a German
(de) version of my site:
I have the following code in there:
routers = dict(
# base router
BASE = dict(
This is a mail mistakenly sent to web2py-developers. I think that the
note about not sending questions to the developers list is usually
ignored. Maybe it could be made available somewhere else (perhaps at
web2py.com).
Original post:
I have a nginx server, one domain, and two web2py applications
Hello all.
I've read a lot of literature about routes.py, it's amazing how it can be
powerful and complex.
However for my simple needs I don't reach to find the solution.
In my web2py root folder I have this routes.py, using the parameter-based
system:
routers = dict(
BASE = dict(
On 13 Dec 2013, at 12:01 PM, Gael Princivalle gaelprinciva...@gmail.com wrote:
I've read a lot of literature about routes.py, it's amazing how it can be
powerful and complex.
However for my simple needs I don't reach to find the solution.
In my web2py root folder I have this routes.py,
Sorry Dave for my bad English.
You've understand exactly what I was saying, also if I'm confused, thanks.
I'm still making the same test on another application in another web2py
installation with a different domain.com, Problems are still the same.
Anyway I'm gone use the init application name,
On Wednesday, November 27, 2013 12:14:22 AM UTC-8, Gael Princivalle wrote:
Sorry Dave for my bad English.
I have no Italian, save for a few terms from music, so you're ahead of me
:-)
You've understand exactly what I was saying, also if I'm confused, thanks.
I'm still making the
Webfaction have restart my application Apache process, now it works with
init. I'm gone make more test, grazie !
Il giorno mercoledì 27 novembre 2013 19:43:47 UTC+1, Dave S ha scritto:
On Wednesday, November 27, 2013 12:14:22 AM UTC-8, Gael Princivalle wrote:
Sorry Dave for my bad English.
It's really strange.
I've try this example from the manual:
routes_in = (
('/testme', '/examples/default/index'),
)
routes_out = (
('/examples/default/index', '/testme'),
)
On the first time I load www.mydomain.com I've examples application on
root, and if I click on some menu items I
On Tuesday, November 26, 2013 8:51:45 AM UTC-8, Gael Princivalle wrote:
It's really strange.
I've try this example from the manual:
routes_in = (
('/testme', '/examples/default/index'),
)
routes_out = (
('/examples/default/index', '/testme'),
)
On the first time I load
For example I've got 3 stupid pages exactly the same, 2 pages are ok but
for one I have an invalid request. I turn back to pages that were ok and
I have again Invalid request.
I've try also renaming myapp in init but in the path I've got
www.mydomain.com/init/default/page , too bad.
Any
Hi.
I've got a domain that is on Webfaction, with a web2py app.
I just want to have my app on the domain root.
Now I have:
https://www.mydomain.com/myapp/default/index
I would like to see my app on :
https://www.mydomain.com
I've read that:
El Sun, 24 Nov 2013 13:21:22 -0800 (PST)
Gael Princivalle gaelprinciva...@gmail.com escribió:
Hi.
I've got a domain that is on Webfaction, with a web2py app.
I just want to have my app on the domain root.
Now I have:
https://www.mydomain.com/myapp/default/index
I would like to see my app
On 24 Nov 2013, at 1:21 PM, Gael Princivalle gaelprinciva...@gmail.com wrote:
I've got a domain that is on Webfaction, with a web2py app.
I just want to have my app on the domain root.
Now I have:
https://www.mydomain.com/myapp/default/index
I would like to see my app on :
Hello all,
I want to play with URL revrite. So I took the example in the book
(http://web2py.com/books/default/chapter/29/04?search=routes_in#Pattern-based-system)
In the file *web2py\applications\myApp\routes.py* I have :
#!/usr/bin/python
# -*- coding: utf-8 -*-
routes_in = (
('/testme',
On 2 May 2013, at 5:29 AM, Loïc loic.esp...@gmail.com wrote:
I want to play with URL revrite. So I took the example in the book
(http://web2py.com/books/default/chapter/29/04?search=routes_in#Pattern-based-system)
In the file web2py\applications\myApp\routes.py I have :
#!/usr/bin/python
I got my routes.py derived from the router.example.py which works like a
charm. for my 2 webapplications.
Now I want it to do a couple extra things:
redirect from myURL.com to www.myURL.com
redirect from myip to www.myURL2.com/s?ie=UTF8
thanks for your help
--
---
You received this message
In my application every registered user has a shortname stored in
auth_user, which he can use to reference his home page. For this purpose I
have the following code in 00_db.py:
if request.controller == 'default' and request.function == 'index' and
request.args(0) == 'nl':
On 29 Jan 2013, at 1:44 AM, Annet anneve...@googlemail.com wrote:
In my application every registered user has a shortname stored in auth_user,
which he can use to reference his home page. For this purpose I have the
following code in 00_db.py:
if request.controller == 'default' and
I've been seeing this over the past week or so since I
started separating my apps into subdomains using the parametric router. My
entries are simple:
routers = dict(
BASE = dict(
domains = {
'domain.com' : 'blog',
'chat.domain.com' : 'chat',
On 31 Dec 2012, at 10:36 AM, HittingSmoke hittingsm...@gmail.com wrote:
I've been seeing this over the past week or so since I started separating my
apps into subdomains using the parametric router. My entries are simple:
routers = dict(
BASE = dict(
domains = {
I'll re-enable the router and keep a closer eye on things when restarting
uWSGI.
The process hopping sounds right. I run uWSGI with six workers so there are
six processes balancing load. The next time it happens I'll restart with a
single worker and see if the inconsistency on page load is
I tried the parametric router and it works super-fine!
I wasn't using it because at the very beginning I found the pattern-based
method more powerful.
Thank you very much for your help Jonathan!
I wish you a good Tuesday! ;)
Cheers,
David
On 22 October 2012 18:55, Jonathan Lundell
Hey there! :)
I have got some doubts about the use of anchor links and the URL rewriting
by means of *routes.py*.
This is my *routes.py*:
routes_out = (
('/myapp/default/$f', '/$f')
)
So* **/myapp/default/just_a_page* is rewritten in output like
*/just_a_page*. This works.
The problem
On 22 Oct 2012, at 9:28 AM, David Sorrentino sorrentino...@gmail.com wrote:
I have got some doubts about the use of anchor links and the URL rewriting by
means of routes.py.
This is my routes.py:
routes_out = (
('/myapp/default/$f', '/$f')
)
So /myapp/default/just_a_page is
hi,
I put my apps and routes.py in a new folder web2py 2.0.9 and all my
websites are pointed to init app
and I downgraded back to 1.99.4
--
My site hosted on webfaction started returning a 500 internal server error
this morning and it looks like it's choking on my routing. What's strange
is that it was all working (with no changes made) for quite a while prior
to this. My server log shows this at the start of the problem:
[Thu Sep
I will try this post again, unfortunately I did not have a copy
I tried this example routes.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
routes_app = ((r'/(?Pappwelcome|admin|app)\b.*', r'\gapp'),
(r'(.*)', r'myapp'),
(r'/?(.*)', r'myapp'))
I restarted the server
I tried the example routes.py, routes_app from routes.example.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
routes_app = ((r'/(?Pappwelcome|admin|app)\b.*', r'\gapp'),
(r'(.*)', r'myapp'),
(r'/?(.*)', r'myapp'))
I am restarting web2py between any changes. If I put a
I have updated my routes.py as below
default_application = 'blog'# ordinarily set in base routes.py
default_controller = 'post' # ordinarily set in app-specific routes.py
default_function = 'index' # ordinarily set in app-specific routes.py
This works fine for the home page and the
What is the preferred way of rewriting URLs?
Also, are there any advantages or disadvantages of choosing one over the
other?
I like the idea of routes.py better because of portability, but is it any
good in case of static files?
error messages
how to customize the error messages in html 404,405 routes.py
Ovidio Marinho Falcao Neto
Web Developer
ovidio...@gmail.com
ovidiomari...@itjp.net.br
ITJP - itjp.net.br
83 8826 9088 - Oi
You can find the detailed information here:
https://github.com/web2py/web2py/blob/master/routes.example.py#L51
and here:
http://web2py.com/books/default/chapter/29/4#Routes-on-error
On Thu, Apr 26, 2012 at 5:48 PM, Ovidio Marinho ovidio...@gmail.com wrote:
error messages
how to customize
I tried changing map_hyphen = True as i want to change _ to - in urls.
I made changes in routes.py and router.py, but the changes are not
reflecting, I even restarted server many times but bad luck.
Anybody please help me.
Thanks in advance
On Apr 26, 2012, at 7:14 AM, nav010 wrote:
I tried changing map_hyphen = True as i want to change _ to - in urls.
I made changes in routes.py and router.py, but the changes are not
reflecting, I even restarted server many times but bad luck.
Anybody please help me.
Post your routes,
got a problem with my routes
routes_in = (
('/asdf', '/aggat/default/rules'),
)
routes_out = (
('/aggat/default/rules', '/asdf'),
)
isn't working, but i followed the same format on the web2py tutorial
defining the base router works when i have that defined alone
Hi all,
For one of my applications, I use web2py as a rest backend for a extjs
application. So, in order to redirect to this app, I have
def index():
example action using the internationalization operator T and flash
rendered by views/default/index.html or views/generic.html
On Apr 2, 2012, at 2:57 AM, Joseph.Piron wrote:
For one of my applications, I use web2py as a rest backend for a extjs
application. So, in order to redirect to this app, I have
def index():
example action using the internationalization operator T and flash
rendered by
Hey all,
I have renamed (and edited) routes.py for both incoming and outgoing urls.
I have tried messing up with the url tuples and it looks as if web2py is
just not picking that up at all. I have restarted web2py server, I have
tried changed in the controllers (and does changes are picked
Anthony, yes to your first question. And i know it's not picking it up
because I mangled it on purpose and it kept working with no errors. As soon
as I can VPN to work, I'll post its contents. Thx.
On Friday, March 16, 2012, Anthony abasta...@gmail.com wrote:
To be clear, you have a file
I have followed what both the book and sample files say can be done in
routes.py:
default_application = 'try'
default_controller = 'default'
default_function = 'index'
This simply doesn't work. Entering www.mydomain.com as the target
url in the browser routes to the welcome app not
Hi List,
I've installed mod_wsgi on our server and added a vhost so that each
application is accessible via www.examples.com/app_name
One of the apps is ready; so I created another vhost and started an
separate instance of web2py.
The second instance uses a routes.py to remove the appname from
I know routes.py has been brought up many times, but I haven't been
able to get it to work for me.
Here's what I want to do:
I would like to remove default from the URL in
localhost/app/default/index
so that it appears as
localhost/app/index
I have referenced the posts in google groups and at
If I put
routes_onerror = [
(r'*/*', r'/myapp/errors/index')
]
Then it allows me to capture
domain/abc
and do what I want according to what is after the slash.
However if I just put
domain it goes to the welcome page.
So if I change routes.py to
routers = dict(
BASE =
On 26.8.2011 7:57, Jonathan Lundell wrote:
On Aug 25, 2011, at 9:28 PM, Kenneth Lundström wrote:
On 26.8.2011 5:21, Jonathan Lundell wrote:
On Aug 25, 2011, at 4:48 PM, Kenneth Lundström wrote:
I'd like to have three types of routings:
a) web2py.main_domain.comdefaults to init, but you
I'd like to have three types of routings:
a) web2py.main_domain.comdefaults to init, but you can choose the
application with web2py.main_domain.com
b) testing.main_domain.com leads to application: testing
c) development.main_domain.comleads to application: testing,
On Aug 25, 2011, at 4:48 PM, Kenneth Lundström wrote:
I'd like to have three types of routings:
a) web2py.main_domain.comdefaults to init, but you can choose the
application with web2py.main_domain.com
b) testing.main_domain.com leads to application: testing
c)
On 26.8.2011 5:21, Jonathan Lundell wrote:
On Aug 25, 2011, at 4:48 PM, Kenneth Lundström wrote:
I'd like to have three types of routings:
a) web2py.main_domain.comdefaults to init, but you can choose the
application with web2py.main_domain.com
b) testing.main_domain.com leads to
On Aug 25, 2011, at 9:28 PM, Kenneth Lundström wrote:
On 26.8.2011 5:21, Jonathan Lundell wrote:
On Aug 25, 2011, at 4:48 PM, Kenneth Lundström wrote:
I'd like to have three types of routings:
a) web2py.main_domain.comdefaults to init, but you can choose the
application with
Hi,
I'm struggling with the routing in web2py and I'm hoping someone can
point me in the right direction (I'm a web2py newbie).
I want to change this (which works):
http://127.0.0.1:8000/init/admin_courses/index
to this:
http://127.0.0.1:8000/admin/courses
but I can't get it to work with the
On Aug 14, 2011, at 3:26 AM, fishwebby wrote:
I'm struggling with the routing in web2py and I'm hoping someone can
point me in the right direction (I'm a web2py newbie).
I want to change this (which works):
http://127.0.0.1:8000/init/admin_courses/index
to this:
Just trying to set a favicon in an application called init on a
webfaction.
However, I just get Internal Server Error everytime I use routes.py.
Here's the code:
default_application = 'init'# ordinarily set in base routes.py
default_controller = 'default' # ordinarily set in app-specific
I was wondering how do I configure routes.py so that my application
myapp works like this
when i type www.myapp.com it will go to that web2py application. I
know in windows i can edit the host file in windows but I want it to
go directly to my application. All of my paths are absolute paths
I use autoroutes in routes.py
You need routes.conf
http://snipt.net/rochacbruno/routesconf/
In the above file replace with your domain and your app.
127.0.01.1 /yourapp/default
yourdomain.com /yourapp/default
http://snipt.net/rochacbruno/routesconf/and routes.py
I haven't gone through all of the thread.
But I'm using routes with GAE.
I'm using latest version of web2py.
My routes is
routes_in = (
(r'.*:/favicon.ico', r'/init/static/favicon.ico'),
(r'.*:/robots.txt', r'/init/static/robots.txt'),
)
.
I have in the root of web2py the routes.py configured with that:
default_application = 'arritmia'# ordinarily set in base routes.py
default_controller = 'default' # ordinarily set in app-specific routes.py
default_function = 'index' # ordinarily set in app-specific routes.py
Ok,
On Sep 23, 2010, at 4:34 AM, Albert Abril wrote:
I have in the root of web2py the routes.py configured with that:
default_application = 'arritmia'# ordinarily set in base routes.py
default_controller = 'default' # ordinarily set in app-specific routes.py
default_function = 'index'
Thanks all!
On Tuesday, September 14, 2010, mdipierro mdipie...@cs.depaul.edu wrote:
Thanks Jonathan, I will fix this tonight.
massimo
On Sep 14, 9:56 am, Jonathan Lundell jlund...@pobox.com wrote:
Massimo, here's a patch. In rewrite.py, change this:
exec routesfp.read() in
Hi,
I'm new to web2py and python.
Here is what I wanna accomplish:
I want to have routes.py in each application, so I can make separate
applications with different set of routes, because I will be hosting
it in a shared hosting and they have limited inodes of 50,000. So I
just want to keep a copy
Does routes.py work on GAE? I've recently deployed an app which used
the 5-line routes.py from the book for routing robots.txt and
favicon.icon. I just wanted to get rid of that 100% error rate on
those two files. I recevied the following message. Only after
removing routes.py again did the
Hello,
In my routes.py file, I have this line:
routes_in = (('.*:/crossdomain.xml', '/init/static/crossdomain.xml'),)
Working locally, if I go to http://localhost:8080/crossdomain.xml ,
the file is there.
However, when I upload to google app engine,
Hi all,
I'm having some real trouble finding out how to get forms to self-
submit successfully, when the URL they are on is re-routed using
routes.py.
My app is called Riffant I have a form running on / (/ is re-routed
to /riffant/default/index) which doesn't work using this config:
routes_in
Hello
I have step up an web2py project on http://bondiu.info
I've started to edit the welcome application and I've made an init
symbolic link to the welcome application.
Now I pretend to remove the /init/ from the urls.
This way I renamed routes.example.py to routes.py and made this
changes
I downloaded web2py version 1.75.5. I then renamed the welcome
application to init.
I want to remove the application prefix from the application's URLs
because I want to only expose one application. I created a routes.py
in the web2py folder and tried the following:
On Mon, Mar 1, 2010 at 03:47, Elam Watkins elamwatk...@gmail.com wrote:
I downloaded web2py version 1.75.5. I then renamed the welcome
application to init.
I want to remove the application prefix from the application's URLs
because I want to only expose one application. I created a routes.py
Hi All,
I have configured web2py to work with NGINX through FCGI, and
everything works fine except for routes.py.
I am using routes.py to redirect various sub domains to their
applications.
I have compared between the output of the request object in the case
of using CherryPy and in the case
Hi Ahmed,
Can you share with us how you got web2py running on nginx with
fastcgi?
brgds
On Feb 23, 2:12 pm, Ahmed Sameh ahmedsa...@3mates.com wrote:
Hi All,
I have configured web2py to work with NGINX through FCGI, and
everything works fine except for routes.py.
I am using routes.py to
Hi rick,
I replied on your post, I hope that will help you.
http://groups.google.com/group/web2py/browse_thread/thread/3c5d897149a3f1eb/679bdb2954ffec15#679bdb2954ffec15
On Feb 24, 1:41 am, rick rmartin2...@gmail.com wrote:
Hi Ahmed,
Can you share with us how you got web2py running on nginx
Hello,
I would like to tackle the simple task of running web2py on a folder
of the website, say
http://example.org/w2p/
So that an application will be like http://example.org/w2p/example/default/index
Setting up the WSGI handler is easy, however routes.py gives me a hard
time. I tried a bunch
On Jan 29, 2010, at 9:17 AM, Tamas wrote:
I would like to tackle the simple task of running web2py on a folder
of the website, say
http://example.org/w2p/
So that an application will be like
http://example.org/w2p/example/default/index
Setting up the WSGI handler is easy, however
routes_in
('^/admin(?Pany.*)', '/admin\gany'),
('^/appadmin(?Pany.*)', '/init/appadmin\gany'),
('^/(?Pany.*)', '/init/default/\gany'),
routes_out
('/init/appadmin(?Pany.*)', '/appadmin\gany'),
('/init/default(?Pany.*)', '/default\gany'),
-Thadeus
92 matches
Mail list logo