google app engine - Routing in webapp2 -


i playing around google course builder. it's built using google app engine , webapp2 framework.

i not familiar webapp2 , routing in general , think that's reason doubt. , perhaps people have worked on gcb able answer question.

i editing view (as in mvc). it's html file. created hyperlink view (which html file created myself), getting 404 when click on link.

i tried out possible variations file location.

href="views/doubts.html"  

would open "localhost:8080/views/doubts.html". gives me 404 thought file exists. tried out variations ("/views/doubts", "doubts.html", "doubts" , on).

perhaps direct access views might blocked other part of application. in such case, preferred way go it? have create controller redirects or so? have never used mvc before.

check app.yaml first. app.yaml decide how gogole app engine response each kind of request. https://developers.google.com/appengine/docs/python/config/appconfig

basically there 2 ways google app engine used response request.

  1. response via static files https://developers.google.com/appengine/docs/python/config/appconfig#static_file_handlers

static files files served directly user given url, such images, css stylesheets, or javascript source files. static file handlers describe files in application directory static files, , urls serve them.

2 . response via script https://developers.google.com/appengine/docs/python/config/appconfig#script_handlers

a script handler executes python script handle request matches url pattern. mapping defines url pattern match, , script executed. in python 2.5, cgi preferred method of defining script handlers. in python 2.7, wsgi preferred method. cgi works in python 2.7, features of runtime, such concurrent requests, available if app uses wsgi.

the 1) method allow user host simple static website without touch webapp2 or url routing


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -