8.1. Creating the homepage banners
class Banner(models.Model) :
image = models.ImageField(null=True, blank=True)
link_output = models.CharField(max_length=400, null=True, blank=True) #? where the user will be sent after clicking the banner
active = models.BooleanField(default=False) #? whether the link is currently active or not
def __str__(self):
return f"{self.link_output} - Active: {self.active}"python manage.py makemigrationspython manage.py migrateadmin.site.register([Categoric, Client, Type, Product, ItemStock, Order, OrderedItem, Adres, Banner])
Last updated