Re: Model to select only 1 object from multiple objects

2013-11-04 Thread Aamu Padi
Thank you. I hope I can walk through now. :) On Mon, Nov 4, 2013 at 7:43 PM, Ruturaj Dhekane wrote: > Your model can work. But I think the model there is an alternate way to > create this model. > > The way I might design this is have a profile model > Profile = name, birth date, location, favo

Re: Model to select only 1 object from multiple objects

2013-11-04 Thread Ruturaj Dhekane
Your model can work. But I think the model there is an alternate way to create this model. The way I might design this is have a profile model Profile = name, birth date, location, favorite books, friends, ProfilePicture (foreignKey) ProfilePicture = image, caption So now, you can have multiple p

Model to select only 1 object from multiple objects

2013-11-03 Thread Aamu Padi
How to make a model with a yes/no field, if yes that particular object (image) will be used as the background, and no other image will be selected. I have come with this model: class BackgroundImage(models.Model): user = models.ForeignKey(user) caption = models.CharField(max_l