Exemplo n.º 1
0
def _init_config(request):
    q = Config.all()
    if q.count(1) == 0:
        c = Config()
        c.varname = "dummy"
        c.value = "you can safely delete this after creating new var/vals"
        c.put()
        return HttpResponse("""Config initialized. You can now add new values 
            in the <a href="/_ah/admin">Datastore admin</a>.""")
    else:
        return HttpResponse("""Config does not need initialization. You can
            edit the config in the <a href="/_ah/admin">Datastore admin</a>."""
                            )
Exemplo n.º 2
0
def _init_config(request):
    q = Config.all()
    if q.count(1) == 0:
        c = Config()
        c.varname = "dummy"
        c.value = "you can safely delete this after creating new var/vals"
        c.put()
        return HttpResponse(
            """Config initialized. You can now add new values 
            in the <a href="/_ah/admin">Datastore admin</a>."""
        )
    else:
        return HttpResponse(
            """Config does not need initialization. You can
            edit the config in the <a href="/_ah/admin">Datastore admin</a>."""
        )