On Fri, Oct 18, 2013 at 1:09 PM, amanjot kaur <
kauram...@gmail.com> wrote:
> What should I need to do in django, if I want to edit the information
> filled in django, like we edit our profile in facebook after filling
> once?
That means editing the already saved data?
Assuming you are using a ModelForm, use the instance keyword argument,
and pass the model you are updating.
So, if you have MyModel and MyModelForm, then your code might look like:
my_record = MyModel.objects.get(id=XXX)
form = MyModelForm(instance=my_record)
And then, when the user sends back data by POST:
form = MyModelForm(request.POST, instance=my_record)
Documentation is here:
http://docs.djangoproject.com/en/1.3/topics/forms/modelforms/
--
Sandeep Kaur
E-Mail:
mkaur...@gmail.com
Blog:
sandymadaan.wordpress.com