simply way to add another webapp framework to my project.

Posted by zjm1126 on Stack Overflow See other posts from Stack Overflow or by zjm1126
Published on 2010-06-02T08:56:04Z Indexed on 2010/06/02 11:34 UTC
Read the original article Hit count: 324

Filed under:
|
|
|

one webapp project has many url

and i have to change this:

('/addTopic', AddTopic),
('/delTopic', DeleteTopic),
('/addPost', AddPost),
('/delPost', DeletePost),

to this:

('/tribes/addTopic', AddTopic),
  ('/tribes/delTopic', DeleteTopic),
  ('/tribes/addPost', AddPost),
  ('/tribes/delPost', DeletePost),

but ,if i add this to my project ,i have to change the url in every py file or html file ,

in django

it can be this :

urlpatterns = patterns('',
    (r'^articles/2003/$', 'news.views.special_case_2003')),
)

it is easy to add the url of 'news' to my peoject,

but does webapp has this ?

thanks

updated:

(1) my main page url is :

  ('/', MainPage),
  ('/sign', Guestbook),

(2) the url of a webapp project that i want to add is :

('/', MainPage),
('/logout', LogoutPage),
('/login_response', LoginHandler),

and i want to change (1) to this:

('/', MainPage),
('/sign', Guestbook),

('/aa/', p2.MainPage),
('/aa/logout', p2.LogoutPage),
('/aa/login_response', p2.LoginHandler),

so i have to change so many url like / to /aa/ , or change /logout to /aa/logout

in py file and html file , that is a hard work

so any simple way to do this ?

© Stack Overflow or respective owner

Related posts about python

Related posts about google-app-engine