I tried and tried for several hours, and there should be an easy way to get the URL. I thought it was like this:
#from data.models import Program import basehandler class ProgramViewHandler(basehandler.BaseHandler): def get(self,slug):
Whenever this code is executed, I get this error on the stack:
appengine \ ext \ webapp__init __. py ", line 511, in a call to handler.get (* group) TypeError: get () takes exactly 2 arguments (1 given)
I did some debugging, but such debugging exceeds my debugging level. When I remove the slug from def get (self, slug), everything works fine.
This is the basic manipulator:
import os from google.appengine.ext import webapp from google.appengine.ext.webapp import template class BaseHandler(webapp.RequestHandler): def __init__(self,**kw): webapp.RequestHandler.__init__(BaseHandler, **kw) def render_template(self, template_file, data=None, **kw): path = os.path.join(os.path.dirname(__file__), template_file) self.response.out.write(template.render(path, data))
If someone can point me in the right direction, that would be great! Thanks! This is the first time I use stackoverflow to post a question, usually I only read it to fix the problems that I have.
python google-app-engine web-applications
Sam stoelinga
source share