class MenuOptionsModel(models.Model): show_name = models.BooleanField(default=True) show_info = models.BooleanField(default=True) show_images = models.BooleanField(default=False, verbose_name=u'Menu obrazkowe') page_title = models.CharField(max_length=255, verbose_name=u'Tytuł strony', null=True, blank=True) show_page_title = models.BooleanField(default=False) class_prefix = models.CharField(max_length=255, verbose_name=u'prefix stylu', null=True, blank=True) date = models.DateTimeField(blank=True, verbose_name=u'Data dodania', default=datetime.now) order = models.IntegerField(verbose_name=u'Kolejność', blank=True, null=True, default=0) objects = ModelModuleManager() class Meta: db_table = 'module_menu_option' abstract = True def __unicode__(self): return "%s" % self.__class__
class AdvModuleOptionModel(BaseModel): title = models.TextField(blank=True, null=True) show_title = models.BooleanField(default=True) ammount = models.IntegerField(verbose_name=u'Ile reklam naraz', blank=True, null=True, default=0) class_prefix = models.CharField(max_length=255, verbose_name=u'styl', null=True, blank=True) slug = models.SlugField(max_length=900, blank=True, null=True) objects = ModelModuleManager() class Meta: db_table = 'module_adv_option' abstract = True def __unicode__(self): return "%s" % self.__class__ def save(self, *args, **kwargs): if self.slug is not None: if len(self.slug) == 0: strtime = "".join(str(time()).split(".")) string = "%s-%s" % (strtime[5:], self.title) self.slug = slugify(string) else: self.slug = '' super(AdvModuleOptionModel, self).save(*args, **kwargs)
class LinkModuleOptionModel(BaseModel): title = models.TextField(blank=True, null=True) link = models.TextField(blank=True, null=True) slug = models.SlugField(max_length=900, blank=True, null=True) show_title = models.BooleanField(default=False) new_window = models.BooleanField(default=False) objects = ModelModuleManager() class Meta: db_table = 'module_link_option' abstract = True def __unicode__(self): return "%s" % self.__class__ def save(self, *args, **kwargs): if self.slug is not None: if len(self.slug) == 0: strtime = "".join(str(time()).split(".")) if self.title != '': string = "%s-%s" % (strtime[5:], self.title) else: string = "%s" % (strtime[5:]) self.slug = slugify(string) else: self.slug = '' super(LinkModuleOptionModel, self).save(*args, **kwargs)
class SiteMapOptionModel(BaseModel): show_name = models.BooleanField(default = True) show_info = models.BooleanField(default = True) page_title = models.CharField(max_length=255, verbose_name=u'Tytuł strony', null=True, blank = True) show_page_title = models.BooleanField(default = False) class_prefix = models.CharField(max_length=255, verbose_name=u'prefix stylu',null=True, blank = True) slug = models.SlugField(max_length=900, blank=True, null=True) objects = ModelModuleManager() class Meta: db_table = 'module_sitemap_option' abstract = True def __unicode__(self): return "%s" % self.__class__ def save(self, *args, **kwargs): if self.slug is not None: if len(self.slug) == 0: strtime = "".join(str(time()).split(".")) if self.page_title is not None: string = "%s-%s" % (strtime[5:], self.page_title) else: string = "%s-sitemap" % (strtime[5:]) self.slug = slugify(string) else: self.slug = '' super(SiteMapOptionModel, self).save(*args, **kwargs)
class ArticleOptionsModel(models.Model): show_title = models.BooleanField(default = True) show_footer = models.BooleanField(default = True) show_info = models.BooleanField(default = True) page_title = models.CharField(max_length=255, verbose_name=u'Tytuł strony',null=True, blank = True) show_page_title = models.BooleanField(default = False) class_prefix = models.CharField(max_length=255, verbose_name=u'prefix stylu',null=True, blank = True) date = models.DateTimeField(blank=True, verbose_name=u'Data dodania',default=datetime.now) objects = ModelModuleManager() class Meta: db_table = 'module_article_option' abstract = True def __unicode__(self): return "%s" % self.__class__
class ArticleListModuleOptionModel(models.Model): show_title = models.BooleanField(default=True) show_footer = models.BooleanField(default=True) show_info = models.BooleanField(default=True) show_more = models.BooleanField(default=True) small = models.BooleanField(default=False) show_only_images = models.BooleanField(verbose_name=u'Lista obrazkowa', default=False) use_li = models.BooleanField(verbose_name=u'Użyj list', default=False) fetch_subcategories = models.BooleanField(default=False) subcategories_depth = models.IntegerField(blank=True, null=True) link_title = models.BooleanField(default=True) show_mainimage = models.BooleanField(default=True) exposefirst = models.BooleanField(default=True) page_title = models.CharField(max_length=255, verbose_name=u'Tytuł strony', null=True, blank=True) show_page_title = models.BooleanField(default=False) class_prefix = models.CharField(max_length=255, verbose_name=u'prefix stylu', null=True, blank=True) date = models.DateTimeField(blank=True, verbose_name=u'Data dodania', default=datetime.now) order = models.CharField(max_length=255, verbose_name=u'Kolejność', null=True, blank=True) count = models.IntegerField(verbose_name=u'Ilość elementów', blank=True, null=True, default=10) only_with_image = models.BooleanField(default=False, verbose_name=u'Tylko ze zdjęciem') objects = ModelModuleManager() class Meta: db_table = 'module_article_list_option' abstract = True def __unicode__(self): return "%s" % self.__class__
class NewsFlashColumnModuleModel(BaseModel): path = str(datetime.now().year) + '/' + str(datetime.now().month) fullpath = 'images/modules/' + path show_title = models.BooleanField(default=True) show_footer = models.BooleanField(default=True) show_more = models.BooleanField(default=True) show_info = models.BooleanField(default=True) link_title = models.BooleanField(default=True) show_mainimage = models.BooleanField(default=True) exposefirst = models.BooleanField(default=True) columns = models.IntegerField(null=True, blank=True) page_title = models.CharField(max_length=255, verbose_name=u'Tytuł strony', null=True, blank=True) show_page_title = models.BooleanField(default=True) class_prefix = models.CharField(max_length=255, verbose_name=u'prefix stylu', null=True, blank=True) info = RichTextField(config_name='full_ck', verbose_name=u'Krótki opis', null=True, blank=True) image = ImageField(upload_to=fullpath, verbose_name='Zdjęcie', blank=True, null=True) objects = ModelModuleManager() class Meta: db_table = 'module_newsflash_c_option' abstract = True def __unicode__(self): return "%s" % self.__class__
class HTMLBoxModuleOptionModel(BaseModel): title = models.TextField(blank=True, null=True) html = models.TextField(blank=True, null=True) slug = models.SlugField(max_length=900, blank=True, null=True) objects = ModelModuleManager() class Meta: db_table = 'module_htmlbox_option' abstract = True def __unicode__(self): return "%s" % self.__class__ def save(self, *args, **kwargs): if self.slug is not None: if len(self.slug) == 0: strtime = "".join(str(time()).split(".")) string = "%s-%s" % (strtime[5:], self.title) self.slug = slugify(string) else: self.slug = '' super(HTMLBoxModuleOptionModel, self).save(*args, **kwargs)