Re: [mezzanine-users] Adding a collection of Images to a custom model in Mezzanine

2014-05-26 Thread Stephen McDonald
Just quoting the Django docs here: "To refer to models defined in another application, you can explicitly specify a model with the full application label." https://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey On Mon, May 26, 2014 at 8:18 PM, Shaunak Sinha wrote: > Hey Guys, > >

Re: [mezzanine-users] Adding a collection of Images to a custom model in Mezzanine

2014-05-26 Thread Shaunak Sinha
Hey Guys, This is may seem like a very broad question but how do you create a foreign key to Gallery in Activity model... I wrote this line in my Activity model: *activity_gallery = models.ForeignKey("Gallery", null=True, blank=True, related_name="ActivityImages")* When I drop my database and

Re: [mezzanine-users] Adding a collection of Images to a custom model in Mezzanine

2014-05-21 Thread Shaunak Sinha
Thanks a lot for the quick replies Josh and Kenneth! I'll try out the solutions you guys recommend and get back. Best Regards. -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it

Re: [mezzanine-users] Adding a collection of Images to a custom model in Mezzanine

2014-05-21 Thread Shaunak Sinha
Thanks a lot for the quick replies Josh and Kenneth! I'll try out the solutions you guys recommend and get back. On Wednesday, May 21, 2014 7:41:50 PM UTC+5:30, Kenneth Bolton wrote: > > Alternatively, create an optional foreign-key on your Activity model to > Gallery. > > > On Wed, May 21, 201

Re: [mezzanine-users] Adding a collection of Images to a custom model in Mezzanine

2014-05-21 Thread Ken Bolton
Alternatively, create an optional foreign-key on your Activity model to Gallery. On Wed, May 21, 2014 at 10:05 AM, Josh Cartmell wrote: > Hey Shaunak, I would just look at the way it is implemented in the Gallery > code and do something similar (you could probably even copy/past large > portions

Re: [mezzanine-users] Adding a collection of Images to a custom model in Mezzanine

2014-05-21 Thread Josh Cartmell
Hey Shaunak, I would just look at the way it is implemented in the Gallery code and do something similar (you could probably even copy/past large portions of the code). On Wed, May 21, 2014 at 2:13 AM, Shaunak Sinha wrote: > Hi Everyone, > > I am new to Mezzanine and am not sure how to go about

[mezzanine-users] Adding a collection of Images to a custom model in Mezzanine

2014-05-20 Thread Shaunak Sinha
Hi Everyone, I am new to Mezzanine and am not sure how to go about doing this. We have created a custom model called '*activity*' which contains different fields. This allows the admin to create activities by adding relevant information. We need to be able to upload a collection of images as p