Re: How to copy and object from one model to another model

2013-11-05 Thread Aamu Padi
And how do I copy these images from one model to another? On Wed, Nov 6, 2013 at 1:40 AM, Rafael E. Ferrero wrote: > if you see many similarities between two models will surely are the same > thing. So BackgroundImage and ProfilePicture are the same thing and Photo > its very similar to. I think

Re: How to copy and object from one model to another model

2013-11-05 Thread Rafael E. Ferrero
if you see many similarities between two models will surely are the same thing. So BackgroundImage and ProfilePicture are the same thing and Photo its very similar to. I think you must to use inheritance of models [1] an use choices [2] for distinct types of pics I would do the following: class

How to copy and object from one model to another model

2013-11-05 Thread Aamu Padi
Each user has many *albums*, and each album has its many photos. And each user has one *background image* to hold its many images. Similarly, a user has one *profile picture* to hold its many images. These are my models: class UserProfile(models.Model): user = models.OneToOneField(User) p