Thanks guys. I appreciate the help.
On Sep 29, 6:43 am, bruno desthuilliers
wrote:
> On 29 sep, 12:31, Steve Holden wrote:
>
> > On 9/29/2010 5:25 AM, Daniel Roseman wrote:
> > > You can use the get_all_field_names method in model._meta to get all
> > > the actual fields, and set them on the dup
On 29 sep, 12:31, Steve Holden wrote:
> On 9/29/2010 5:25 AM, Daniel Roseman wrote:
> > You can use the get_all_field_names method in model._meta to get all
> > the actual fields, and set them on the duplicate:
>
> > for field in foo._meta.get_all_field_names():
> > setattr(spam, get
On 9/29/2010 5:25 AM, Daniel Roseman wrote:
> On Sep 29, 6:06 am, Yo-Yo Ma wrote:
>> I have two models that are identical in structure except one has 2
>> extra fields. The second one is used for record keeping and is never
>> edited by users. The system takes the first model and copies it to the
On Sep 29, 6:06 am, Yo-Yo Ma wrote:
> I have two models that are identical in structure except one has 2
> extra fields. The second one is used for record keeping and is never
> edited by users. The system takes the first model and copies it to the
> second model, adding some extra meta informatio
You can use also introspection if the number of attributes is high.
http://stackoverflow.com/questions/3818825/python-what-is-the-correct-way-to-copy-an-objects-attributes-over-to-another
2010/9/29 Yo-Yo Ma :
> I have two models that are identical in structure except one has 2
> extra fields. The
I have two models that are identical in structure except one has 2
extra fields. The second one is used for record keeping and is never
edited by users. The system takes the first model and copies it to the
second model, adding some extra meta information, all when a certain
action is performed aga
6 matches
Mail list logo