def get(self,name): user = users.get_current_user() ganglion = Ganglion().all().filter('user ='******'name =', name) ganglion = ganglion.fetch(1) if not ganglion: self.redirect('/') else: ganglion = ganglion[0] if not ganglion.checkUser(): self.error(404) return self.redirect('/ganglion/%s' % ganglion.key())
def post(self): ganglion = Ganglion() ganglion.name = 'New (Click to change)' ganglion.user = users.get_current_user() ganglion.put() self.redirect('/ganglion/%s' % ganglion.key())