Beispiel #1
0
def getDefault(cortex):
    default = cortex.default
    if not default:
        default = Ganglion()
        default.name = "Cortex Dump"
        default.user = cortex.user
        default.put()
        cortex.default = default
        cortex.put()
    return default
Beispiel #2
0
 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())