Hello I'm new in Django using 1.4version. So got some error. 'myapp.models.AdversiteImages'> has no ForeignKey to <class 'myapp.models.Adversite'>
* MODEL* class AdversiteImages(models.Model): image = models.FileField(u'Photo' , upload_to='adversiteimage/%Y/%m/%d', null=True, blank=True) class Adversite(models.Model): category = models.ForeignKey(AdversiteCategory, verbose_name=u'Зарын ангилал', related_name='adv_cat', blank=True, null=True) image_many = models.ManyToManyField(AdversiteImages, verbose_name=u'Photos',related_name="photos") title = models.CharField(u'Title', max_length=128) body = models.TextField(u'Description') *ADMIN* class AdversiteImagesInline(admin.TabularInline): model = Adversite.image_many.through extra = 1 class AdversiteAdmin(admin.StackedInline): fieldsets = ((u'Ерөнхий', {'fields':('category','title','body','code')}), (u'Тайлбар', {'fields':('price','phone','email','image1','image2','image3','image4','image5' ,'is_active','is_special','is_premium','start_at','finish_at')})) list_display = ('category','title','code','is_active','is_special') search_fields = ('category','title','code','is_active') model = Adversite.image_many.through Please help me. -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.