您現在的位置: 365建站網 > 365學習 > Adding new feature about the URL suffix definition of an App

Adding new feature about the URL suffix definition of an App

文章來源:365jz.com     點擊數:213    更新時間:2009-10-14 10:50   參與評論

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'.

And the entry key will be the appname, it's the same with app module name, for example: uliweb.contrib.admin, etc.

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

如對本文有疑問,請提交到交流論壇,廣大熱心網友會為你解答??! 點擊進入論壇


發表評論 (213人查看,2條評論)
請自覺遵守互聯網相關的政策法規,嚴禁發布色情、暴力、反動的言論。
用戶名: 驗證碼: 點擊我更換圖片
最新評論
------分隔線----------------------------
自拍偷拍福力视频,偷拍国际精品,麻豆一区福利电影,国产网红视频午夜福利,se视频大全,久久国产AV影院 欧美激情肉欲高潮电影| tube6最新日本护士| 成年无码av片| 久久九九精品国产免费看小说| 日本成熟…@视频| 好大好爽我要喷水了视频视频| 国产三级视频在线播放线观看| 欧美日韩在线无码一区二区| 亚洲中文无码亚洲人网站| xxxx中国高潮喷水| 性爱小电影| 动图gif动态图污| 天天鲁在视频在线观看| 国产欧美日韩在线观看一区二区| 夜鲁鲁鲁夜夜综合视频 | 97亚洲色欲色欲综合网| 狠狠色在线视频20 8| 无码97色伦在色在线播放| 激情欧美成人小说在线视频| 欧美大胆a级视频| 欧美日韩国产成a片免费网站| yy6090青苹果手机理论免费| younggir第一次young| 日韩欧美在线综合网另类| 欧美大胆性生话| 美国特级A毛片免费网站| 欧洲美熟女乱又伦| 无遮挡色视频真人免费下载| 欧美顶级毛片在线看| 18禁日本黄无遮挡禁动漫| 强睡年轻的女老板3| http://www.farrahabrahamsexvideo.com