Check out ModelForms: https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#django.forms.ModelForm
Note: I'm not sure which version of Django you are using but you may want to choose a different document-version respectively.
Also, check out CreateView, UpdateView, and DeleteView for your Views: https://docs.djangoproject.com/en/dev/ref/class-based-views/
An example that I came across from a quick search: http://stackoverflow.com/questions/5773724/how-do-i-use-createview-with-a-modelform
Note: I'm not sure which version of Django you are using but you may want to choose a different document-version respectively.
Also, check out CreateView, UpdateView, and DeleteView for your Views: https://docs.djangoproject.com/en/dev/ref/class-based-views/
An example that I came across from a quick search: http://stackoverflow.com/questions/5773724/how-do-i-use-createview-with-a-modelform
Good luck!
-- On Wed, Apr 25, 2012 at 11:31 AM, drewyan <andyan08@gmail.com> wrote:
Any useful resources or examples you can suggest would very much appreciated as well.To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/sKakMf6m_k4J.
On Wednesday, April 25, 2012 10:18:45 AM UTC-5, drewyan wrote:Hi all,--I'm relatively new at designing web apps and I've been using Django to set-up a CRUD type application. I recently figured out how perform POST requests from the forms I set-up. I noticed that the data can be changed/updated through the Django admin site or through the Django API using SQL; I'm sure there's a way for non-admins who don't know SQL to retrieve and change/update the data they input through the web app, but it's not clear to me how to accomplish that (or even where to start looking). It looks like "django.views.generic.create_update.create_object" might do the trick, but I'm not using generic views. Are there other options for retrieving form data and then updating it? If you'd like further information, I'd be happy to provide it.
Many thanks.
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment