from django.db import models class FrontImage(models.Model): image = models.ImageField(upload_to='upload/frontImages/') caption = models.TextField(blank=True) link = models.URLField(verify_exists=False, blank=True, null=True, max_length=512) is_active = models.BooleanField(default=True) order = models.IntegerField(default=1) def __unicode__(self): return self.image.url class Meta: ordering = ['order'] class SliderBox(models.Model): title = models.CharField(max_length=64) image = models.ImageField(upload_to='upload/sliderImages/') boldText = models.CharField(max_length=256, blank=True) normalText = models.CharField(max_length=256, blank=True) url = models.CharField(max_length=128, blank=True) order = models.IntegerField(default=1) imageLeft = models.IntegerField(default=0) imageTop = models.IntegerField(default=0) is_displayed = models.BooleanField(default=True) def __unicode__(self): return self.title class Meta: ordering = ['order', 'id'] class MenuHeading(models.Model): name = models.CharField(max_length=64) order = models.IntegerField(default=1) def __unicode__(self): return self.name class Meta: ordering = ['order', 'id'] class MenuItem(models.Model): name = models.CharField(max_length=64) url = models.CharField(max_length=256) menu = models.ForeignKey(MenuHeading) order = models.IntegerField(default=1) def __unicode__(self): return self.name class Meta: ordering = ['order', 'id'] # Create your models here.