my Code :
class Gallery(models.Model):
GameName=models.CharField(max_length=40)
D_text=models.CharField(max_length=50)
Gime=models.ImageField(upload_to='media/',null=True,blank=True)
class Assassin(models.Model):
Gimage=models.ImageField(upload_to='media/assassin',null=True,blank=True)
imagegallery=models.ForeignKey('Gallery',on_delete='CASCADE')
( In localhost Admin
imagegallery = Gallery Object 1 )
class Batman(models.Model):
Gimage=models.ImageField(upload_to='media/batman',null=True,blank=True)
imagegallery=models.ForeignKey('Gallery',on_delete='CASCADE')
( In localhost Admin
imagegallery = Gallery Object 2 )
How can I link my class "Assassin" to class "Gallery" object 1 and class
"Batman" to class "Gallery" object 2, so that when I call object 1 of
Gallery in my Html file the images of Assassin class can also be shown.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CAKXtCfCetV8hphUJ%2BDcr33XQRV5vBwxOeTa3uLV33CXQH%3D8v3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.