Adding new feature about the URL suffix definition of an App

0 views
Skip to first unread message

limodou

unread,
Oct 13, 2009, 10:01:57 AM10/13/09
to uli...@googlegroups.com
You know, Uliweb uses expose() to define url, for example:

@expose('/index')

But when you want to change the url suffix for an App, you should edit
every views file(of cause you can use static urls.py appoach, but I
won't talk about it now).
Fox example how to change '/wiki/*' to '/mywiki/*'? So I add this new
feature to Uliweb, so that you can define the URL suffix for an App,
just adding an entry to
URL session, for example:

[URL]
wiki = '/wiki'

If you didn't define an entry for wiki app, all urls in wiki app won't
be changed at all. But if you define wiki='/wiki' in settings, all
urls in wiki app will be added '/wiki' automatically, even though the
urls is started with '/'. So '/index' will be converted to
'/wiki/index'. So for above problem, you can just change
wiki='/mywiki'.

So in this feature, you can easily change an app URL suffix.

--
I like python!
UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/
UliWeb <<simple web framework>>: http://uliwebproject.appspot.com
My Blog: http://hi.baidu.com/limodou

Reply all
Reply to author
Forward
0 new messages