creating new objects with references to them
johnjsal at gmail.com
Thu Nov 2 17:12:56 CET 2006
> It all depends on what UI you are using (Web frontend? GUI such as
> Tkinter?) and what your use case is.
Making it myself with wxPython.
> What is it exactly that you want to do? Create a bunch of Researcher
> objects and then save them in a single hit? Create a list of
> Researchers and then choose which to save to the db? Populate a list of
> researchers from the db, and have the option of editing or adding new
> ones? Should the new Researcher objects be committed to the db as soon
> as they are saved?
There are two options: save current record and save all records, both
of which put the info in the DB immediately.
> Anyway, a simple list of Researchers should suffice for any of these
> purposes, and assuming you want to commit them all in one hit, you have
> a list of objects ready to iterate over.
Ok, so in making a list does this mean that I won't have a name for
each instance? I just have to iterate over the list when I need them?
I'm not sure how I would do this if the user chooses just to save a
single record and not all of them.
More information about the Python-list