1π
β
You need to actually redirect the user to β/account/β. Rather than returning a call to render
you can do the following:
from django.http import HttpResponseRedirect
def updatetext(request, fb_id):
Account.objects.filter(id=fb_id).update(display_hashtag=request.POST['hashtag'])
fb = get_object_or_404(Account, pk=fb_id)
return HttpResponseRedirect(reverse('account', kwargs={"fb_id": fb_id}))
However, it would be better to pass in a call to reverse
into the HttpResponseRedirect
constructor, but since I donβt know your urls.py I just wrote the relative url.
π€schillingt
Source:stackexchange.com