Thursday, July 30, 2015

How to add fields to an existing model dynamically? Also how to modify existing field of a model dynamically?

Hi,
I am new to Django and Python!.
I am using Django 1.8.3 along with Python 3.2 and using sqlite as the database.
I am trying to setup a site using Django wherein the model is created dynamically( For eg: a Medical form)
The fields of the form are stored in db and the model created dynamically (reference: https://github.com/willhardy/dynamic-models)
The admin guys can modify the fields of this medical form from the admin site. At this time, I would like to modify the model to match the schema modifications done by admin guys.
I understand prior  to Django 1.7, there was django.db.models.loading module that helped in this.

With the current version of Django, how can I add/modify/delete the fields of the dynamic model dynamically?

Your help and suggestions are most welcome.

Regards,
Srinivasa Pradeep

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6a62db2f-5dd7-417c-9d6b-fbbed6b5a149%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment