Using Fedora 8, Django version 0.96.3 I'm currently trying to pull two specific images from a list of images associated with a model.
Currently the Models are like this: class ImageCat(models.Model): name = models.CharField(maxlength=80) class Image(models.Model): name = models.CharField(maxlength=80) location = models.URLField() height = models.IntegerField() width = models.IntegerField() image_category = models.ForeignKey('ImageCat') class System(models.Model): manufacturer = models.ForeignKey('Manufacturer') name = models.CharField(maxlength=80) slug = models.SlugField(prepopulate_from=['name']) ... other stuff... system_pictures = models.ManyToManyField('Image') ImageCat is just a name list, as I may need to add categories in the future. Image doesn't use ImageField as I'm manually uploading the images to another server and didn't want to deal with the extra stuff (uploading etc) I'm currently trying to pull 2 images of specific category types in the template. Unfortunately, I can't quite grasp how to do this... Or weather it would be better to pull them in the View before hand.... I'm currently passing the System fields to the template as 'info'. I've been trying things like 'info.Image.location' but can't figure how to specify the category. Also tried: {% for pic in info.Image %} {% ifequal pic.image_category 'Header_Pic' %} <img ... bla ... > {% endifequal %} {% endfor %} But that gets me nothing. Where am I going wrong? Lance --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---