No problem.
Redirecting after a POST is a good habit. This will avoid duplicated data if
the user reloads the page because if you don't redirect, you'll get a second
POST.
Regards,
Xavier Ordoquy,
Linovia.
Le 14 mai 2012 à 17:42, Michael Ackerman a écrit :
> Thank you very much, that worked.
Thank you very much, that worked. Also, do I have to redirect after POST
(success_url)? for example posting a status on facebook or twitter?
On Sun, May 13, 2012 at 6:06 PM, Xavier Ordoquy wrote:
> Hi,
>
> You should just use action="" since it will post to the url the page was
> generated by.
>
Hi,
You should just use action="" since it will post to the url the page was
generated by.
This will allow you to use a single template for both create and view view
while they keep their respective urls.
As a side note, you should use the url template tag rather than hardcode urls ;)
Regards,
Yes they are using the same template.
Its a very basic template:
{% extends "base.html" %}
{% block main %}
{% csrf_token %}
{{ form }}
{% endblock %}
I figured since update and create were practically the same, I wanted to
see if I could be a bit more DRY. Hence why I'm also looking for a way t
Hi,
What does you form html tag looks like ? Sounds like you're sending the
updateview form to the createview.
Regards,
Xavier Ordoquy,
Linovia.
Le 13 mai 2012 à 11:59, Michael Ackerman a écrit :
> My updateview seems to be creating another object instead of updating the
> object. The good ne
5 matches
Mail list logo