Пример #1
0
class TestimonialsBoxPlugin(CMSPlugin):
    title = models.CharField(max_length=255)
    info = models.CharField(max_length=255, null=True, blank=True)
    who = models.CharField(max_length=255, null=True, blank=True)
    company = models.CharField(max_length=255, null=True, blank=True)
    image = FilerImageField(null=True, blank=True, related_name="testimonial_box_images")
    cmsplugin_ptr = model_fields.CMSPluginField()
Пример #2
0
class DownloadSoftwareButton(CMSPlugin):
    software = models.ForeignKey('SoftwareProduct', blank=False,
                                 help_text='Select a specific software product')
    title = models.CharField(max_length=100, default='Download free trial')
    css_class = models.CharField(max_length=100, default='btn btn-danger btn-lg')
    button_color = ColorField(blank=True)
    button_text_color = ColorField(blank=True)
    cmsplugin_ptr = model_fields.CMSPluginField()

    def __str__(self):
        return 'Download button for: %s' % self.software.name
Пример #3
0
class SoftwareDownloadPlugin(CMSPlugin):

    software = models.ForeignKey('SoftwareProduct', blank=False,
                                 help_text='Select a specific software product')
    button_color = ColorField(blank=True)
    button_text_color = ColorField(blank=True)

    cmsplugin_ptr = model_fields.CMSPluginField()

    def __str__(self):
        return 'Download: %s' % self.software.name
Пример #4
0
class PromotionBoxPlugin(CMSPlugin, model_fields.LinkMixin):

    title = models.CharField(max_length=255)
    info = HTMLField(null=True, blank=True)
    link_text = models.CharField(max_length=255, null=True, blank=True)
    icon = model_fields.Icon()
    image = FilerImageField(null=True, blank=True, related_name="promotional_box_images")
    apply_hover_effect = models.BooleanField(default=False)
    button_color = ColorField(blank=True)
    button_text_color = ColorField(blank=True)
    is_active = models.BooleanField(default=False, help_text='Only applicable with is apply hover effect')
    cmsplugin_ptr = model_fields.CMSPluginField()
    background_color = ColorField(null=True, blank=True)
Пример #5
0
class SoftwareSpecificPricingPlugin(CMSPlugin):
    template = models.CharField(choices=(('vertical', 'Vertical'), ('horizontal', 'Horizontal')),
                                max_length=20, default='vertical')
    pricing = models.ForeignKey('SoftwareProductPricing', blank=False,
                                 help_text='Select a specific pricing for a software product')
    include_modules = models.BooleanField(default=False)
    buy_now_button_color = ColorField(blank=True)
    buy_now_text_color = ColorField(blank=True)
    add_to_cart_button_color = ColorField(blank=True)
    add_to_cart_text_color = ColorField(blank=True)
    show_buy_now_button = models.BooleanField(default=True)
    show_add_to_cart_button = models.BooleanField(default=True)
    cmsplugin_ptr = model_fields.CMSPluginField()

    def __str__(self):
        return 'Pricing for %s %s' % (self.pricing.software.name, self.pricing.name)