2011-08-01 13:49:19 +00:00
|
|
|
from django.db import models
|
|
|
|
|
2011-11-01 01:38:22 +00:00
|
|
|
class FrontImage(models.Model):
|
|
|
|
image = models.ImageField(upload_to='upload/frontImages/')
|
|
|
|
caption = models.TextField(blank=True)
|
2011-12-15 11:35:50 +00:00
|
|
|
link = models.URLField(verify_exists=False, blank=True, null=True, max_length=512)
|
2011-11-01 01:47:14 +00:00
|
|
|
is_active = models.BooleanField(default=True)
|
|
|
|
order = models.IntegerField(default=1)
|
2011-11-01 01:38:22 +00:00
|
|
|
|
|
|
|
def __unicode__(self):
|
|
|
|
return self.image.url
|
|
|
|
|
2011-11-01 02:19:06 +00:00
|
|
|
class Meta:
|
|
|
|
ordering = ['order']
|
|
|
|
|
2011-08-01 13:49:19 +00:00
|
|
|
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)
|
2012-02-14 07:05:20 +00:00
|
|
|
imageLeft = models.IntegerField(default=0)
|
2011-08-01 13:49:19 +00:00
|
|
|
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.
|