gasman / wagtail-form-example

An example of implementing a Django form on a Wagtail site, without using the 'wagtailforms' module
43 stars 12 forks source link

Include example code to edit existing form submission #5

Open xc0m opened 5 years ago

xc0m commented 5 years ago

Hi There,

I was hoping you could include some code to allow existing entries to be edited using the same form. Previously when using Django natively I would use something like:

instance = get_object_or_404(MyModel, id=id) form = MyForm(request.POST or None, instance=instance)

Appreciate the help! Thanks Tyler