Re: How to add objects from one class to another

2013-11-05 Thread Aamu Padi
Ok, I guess, I will try that. Thank you!!! On Tue, Nov 5, 2013 at 10:40 PM, Gonzalo Delgado wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > El 05/11/13 13:14, Aamu Padi escribió: > > I think abstract models is what I am after. But, I also want to get

Re: How to add objects from one class to another

2013-11-05 Thread Gonzalo Delgado
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 El 05/11/13 13:14, Aamu Padi escribió: > I think abstract models is what I am after. But, I also want to get > the latest photo by that user, be that a profile pic or background > pic. Can I use the abstract base model, ie the Image model to >

Re: How to add objects from one class to another

2013-11-05 Thread Aamu Padi
Hello, Gonzalo! :D I think abstract models is what I am after. But, I also want to get the latest photo by that user, be that a profile pic or background pic. Can I use the abstract base model, ie the Image model to atleast get the latest photo by [-pub_date], even though I wont save anything in

Re: How to add objects from one class to another

2013-11-04 Thread Gonzalo Delgado
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 El 04/11/13 19:33, Aamu Padi escribió: > This is my models.py: > > class Image(models.Model): user = models.ForeignKey(User) caption = > models.CharField(max_length=300) image = > models.ImageField(upload_to=get_upload_file_name) pub_date = >

Re: How to add objects from one class to another

2013-11-04 Thread Aamu Padi
What I want is that, each user will have a set of `profile pictures`, `background images` and other set of `photos uploaded`. These images will be kept separately in the templates. And if the user wants, he can easily use (copy) the other set of photos uploaded or images from the background image

How to add objects from one class to another

2013-11-04 Thread Aamu Padi
This is my models.py: class Image(models.Model): user = models.ForeignKey(User) caption = models.CharField(max_length=300) image = models.ImageField(upload_to=get_upload_file_name) pub_date = models.DateTimeField(default=datetime.now) class Meta: