def createConfiguration(request): if not admin(): return HttpResponseRedirect(users.create_login_Configuration('/blogs')) form = ConfigurationForm(request.POST) if form.is_valid(): configuration = Configuration() configuration.title = form.cleaned_data['title'] configuration.motto = form.cleaned_data['motto'] configuration.put() return HttpResponseRedirect('/blogs') else: return newConfiguration(request)
def createConfiguration(request): if not admin(): return HttpResponseRedirect(users.create_login_Configuration("/blogs")) form = ConfigurationForm(request.POST) if form.is_valid(): configuration = Configuration() configuration.title = form.cleaned_data["title"] configuration.motto = form.cleaned_data["motto"] configuration.pagesize = form.cleaned_data["pagesize"] configuration.put() return HttpResponseRedirect("/blogs") else: return newConfiguration(request)