Hi Jeff and Doug Thank you for your prompt and helpful responses! I have to delay my reply because I'm still figuring out certain core concepts of Python that I need to read on before I can reply. :)
Jeff: > Storing their results would be a bit ugly, unless you wanted to create new > tables for each time a user creates a new form. Yes I plan to create a new table each time a user creates a new form, but I was stuck because I have no idea how to proceed with custom columns for the table. > Pickling is another python feature that I haven't looked into yet either. I've looked into python pickling since both you and Doug used it, and I think it's definitely helpful! > http://code.djangoproject.com/wiki/CookBookNewFormsDynamicFields Thank you, that looks good! It looks very similar to what I want to do. And I realized I have yet to go through the wiki resources yet (only checked the documentation, the API, the online book and Python docs previously). I will try out the other resources on the wiki. Doug: > Your form definitions have nothing to do with the database. They are > completely separate things. I understood that somewhat, but I'm still not too clear of the relationships and differences between forms, models and databases in Django. I read the newforms library (http://www.djangoproject.com/ documentation/newforms/) and the django overview documentation (http:// www.djangoproject.com/documentation/overview/). To me, it appears that the difference between them is their superclass. The model class inherits from models.Model, and the forms class inherit from forms.Form. Let me make a wild guess based on my understanding so far. Classes inherited from the Model can store the data in the table of the database, while classes inherited from the Form can only receive/send data via dictionary mappings, and store them only when they are pickled (Thank you Jeff and Doug for introducing this concept to me). > Make a basic model with a 'pickled' textfield. The model fields represent > all the static/searchable fields. What is the difference between static and searchable fields? Any links that would be good reading for me to understand the concepts? > ... do something here to look at self.fieldmeta/instance/ I don't know what this means yet to ask any insightful questions, but I figure it should be quite troublesome for one to explain. I will read up more, and will ask about it again once I have a deeper level of understanding of Django. > return type('GeneratedForm',(GeneratedBaseForm,),{''fieldmeta': > fieldmeta,base_fields': base_fields }) I get the hang of some of this, but I can't explain it clearly for now. From my understanding, this passes a dictionary of data values for the field meta and base fields to the forms to create it. I still have to further read on what the "type" method does in here (Have not gotten around to reading the docs for the type method yet). > fieldmeta = FieldDef.objects.filter(name__in=['fieldname1','fieldname2']) > Form = make_form(fieldmeta) > form=Form() > If you write the save method on the baseform carefully, Correct me if I'm wrong - This saved data will be stored as a pickle, and not saved in the database? Does that mean I will have to create a new dump file for each new form created? Thank you for your time Doug. Your email has opened me up to more concepts to learn in Python and Django for me to proceed. :) Cheers! Vincent Happy new year! --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---