Skip to content

Instantly share code, notes, and snippets.

@0x46616c6b
Created January 13, 2011 21:35
def manage(request):
if request.method == 'POST':
if ('submit' in request.POST) and ('format' in request.POST):
if request.POST['format'] == 'json':
if 'new_entry' in request.POST:
# gives us a json: { "text" : "Dies ist eine Meldung", "isPublic" : 1 }
# entry_text =
# entry_isPublic =
# entry_published = datetime.now()
# -> save
elif 'new_pin' in request.POST:
# { "pin" : "123456" }
# pin_value =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment