on-internet
← Community

Django low level cache views

Stack Overflow ·

I have an index view which validates a form containing various data. Even though the thankyou.html page doesn't have complex calculations to kill the server, I would like to render a slightly different html page if thankyou.html is already low level cached. To tell you the truth, I don't know what key to pass it... Here is the code: def index(request): form = UserForm() message = 'Incorrect data!' if request.method == 'POST': form = UserForm(request.POST) if form.is_valid(): try: User.objects.get(code=form.cleaned_data['code']) except (KeyError, ObjectDoesNotExist): u = User(lastname=form.clea

Comments

Sign in or sign up to comment and upvote.

No comments yet.