Ejemplo n.º 1
0
class MiscItemPlugin(AbstractPlugin):
    title = models.CharField(max_length=200, blank=True)
    description_header = fields.HTMLField(blank=True)
    list_type = models.CharField(max_length=20, choices=LIST_TYPES, default='list-checklist')
    list_text = fields.HTMLField()
    description_footer = fields.HTMLField(blank=True)
    header_type_text = models.CharField(max_length=200, blank=True)
Ejemplo n.º 2
0
class ActiveLearningRatesPlugin(AbstractPlugin):
    """
    Plugin provide ability to edit Active learting block.
    """
    title = models.CharField(max_length=200, blank=True)
    description = fields.HTMLField(blank=True)
    fig_alt = models.CharField(max_length=200, blank=True)
    fig_caption = models.CharField(max_length=200, blank=True)
    list_text = fields.HTMLField()
Ejemplo n.º 3
0
class LandingPlugin(AbstractPlugin):
    """
    Plugin provide widget main page
    """
    title = models.CharField(max_length=200, null=True, blank=True)
    description = fields.HTMLField(null=True, blank=True)
    list_description = fields.HTMLField(null=True, blank=True)
    link_button = models.URLField(null=True, blank=True)
    text_button = models.CharField(null=True, max_length=70, blank=True)
    block_color = models.CharField(max_length=20, choices=COLOR_CHOICES, default='bg-primary')
Ejemplo n.º 4
0
class SocialProofsPlugin(AbstractPlugin):
    """
    Plugin for Social Proofs block.
    """
    title = models.CharField(max_length=200, blank=True)
    post_description = fields.HTMLField()
    more_proofs_link = models.URLField(null=True, blank=True)
Ejemplo n.º 5
0
class ChildPersonalGuidesPlugin(AbstractPlugin):
    """
    Plugin for personal guides block.
    """
    image = FilerImageField(related_name="personal_guides_image", on_delete=models.CASCADE)
    title = models.CharField(max_length=200, blank=True)
    description = fields.HTMLField()
Ejemplo n.º 6
0
class TextCenter(models.Model):
    category = models.ForeignKey(DocumentCategory, null=True)
    sub_category = models.ForeignKey(SubDocumentCategory, null=True)
    title = models.CharField(max_length=250)
    published = models.BooleanField(default=False)
    author = models.CharField(max_length=250,
                              help_text="Content Owner",
                              blank=True,
                              null=True)
    created_by = models.ForeignKey(User, null=True)
    description = fields.HTMLField(blank=True, null=True)
    date = models.DateTimeField(auto_now_add=True)
    payment_status = models.CharField(max_length=100,
                                      choices=PAYMENTSTATUS,
                                      help_text="Payment Required",
                                      verbose_name='Payment Required?')
    file_upload = models.FileField(upload_to='pic_folder/',
                                   null=True,
                                   blank=True,
                                   help_text="Upload an File")
    external_url = models.CharField(max_length=100,
                                    help_text="external_url",
                                    null=True,
                                    blank=True)

    def __str__(self):
        return self.title

    class Meta:
        verbose_name = 'Document / Report Manager'
        verbose_name_plural = 'Documents / Reports Manager'
Ejemplo n.º 7
0
class NetworkEvents(models.Model):
    category = models.ForeignKey(EventCategory,
                                 null=True,
                                 related_name="network_events")
    title = models.CharField(max_length=100)
    published = models.BooleanField(default=False)
    organization_name = models.CharField(max_length=100)
    author = models.ForeignKey(User)
    description = fields.HTMLField()
    start_date = models.DateTimeField()
    end_date = models.DateTimeField()
    location = models.CharField(max_length=100)
    date = models.DateTimeField(auto_now_add=True)
    registration_url = models.URLField(max_length=250, null=True, blank=True)
    registration_required = models.CharField(max_length=100,
                                             choices=REGISTRATION)
    event_banner = models.FileField(upload_to='pic_folder/',
                                    null=True,
                                    blank=True,
                                    help_text="Event Banners")

    def __str__(self):
        return self.title

    class Meta:
        verbose_name = 'Network Events Manager'
        verbose_name_plural = 'Network Events Manager'
Ejemplo n.º 8
0
class BenefitsItemPlugin(AbstractPlugin):
    """
    Item of benefils
    """
    title = models.CharField(max_length=200, blank=True)
    description = fields.HTMLField(blank=True)
    image = FilerImageField(null=True, blank=True, on_delete=models.CASCADE)
Ejemplo n.º 9
0
class ProofPlugin(AbstractPlugin):
    """
    Plugin for proof.
    """
    proof_icon = FilerImageField(related_name="proof_icon", blank=True, null=True, on_delete=models.CASCADE)
    title = models.CharField(max_length=200, blank=True)
    description = fields.HTMLField()
Ejemplo n.º 10
0
class ListPlugin(AbstractPlugin):
    """
    General plugin for adding list
    of tesises with the title and <li> element class.
    """
    title = models.CharField(max_length=200, blank=True)
    list_type = models.CharField(max_length=20, choices=LIST_TYPES, default='list-questions')
    list_text = fields.HTMLField()
Ejemplo n.º 11
0
class KeyNotePlugin(AbstractPlugin):
    """
    Plugin for KeyNote.
    """
    button_text = models.CharField(max_length=200, blank=True)
    uid = models.SlugField(max_length=8, blank=False)
    title = models.CharField(max_length=200, blank=True)
    description = fields.HTMLField()
Ejemplo n.º 12
0
class BannerPlugin(AbstractPlugin):
    """
    Plugin make banner with description and button to go
    """
    title = models.CharField(max_length=200, blank=True)
    description = fields.HTMLField(blank=True)
    link_button = models.URLField(blank=True)
    text_button = models.CharField(max_length=70, blank=True)
    sponsors_text = models.CharField(max_length=200, blank=True)
Ejemplo n.º 13
0
class TextMedia(models.Model):
    title = models.CharField(max_length=100)
    category = models.ForeignKey(Category, null=True)
    author = models.ForeignKey(User)
    body = fields.HTMLField()
    date = models.DateTimeField(auto_now_add=True)
    thumbnail_image = models.FileField(upload_to='pic_folder/',null=True)
    priority = models.BooleanField(default=False)

    def __str__(self):
        return self.title

    class Meta:
        verbose_name = 'Media article'
        verbose_name_plural = 'Articles media'
Ejemplo n.º 14
0
class Newsletter(models.Model):
    title = models.CharField(max_length=250)
    body = fields.HTMLField()
    recipients = models.TextField(null=True, blank=True)
    date = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return self.title

    def save(self, *args, **kwargs):
        subs = Subscription.objects.filter(is_active=True)
        emails = [sub.email for sub in subs]
        self.recipients = json.dumps(emails)

        send_notification.delay(self.title, self.body,
                                settings.EMAIL_HOST_USER, emails)
        super(Newsletter, self).save(*args, **kwargs)
Ejemplo n.º 15
0
class AudioVisual(models.Model):
    title = models.CharField(max_length=100)
    date = models.DateTimeField(auto_now_add=True)
    video_file = models.FileField(upload_to='videos/',
                                  null=True,
                                  verbose_name="Upload Video",
                                  blank=True)
    thumbnail_image = models.ImageField(upload_to="pic_folder/",
                                        null=True,
                                        blank=True,
                                        help_text="Video Thumbnail Image")
    image_thumbnail = ImageSpecField(source='thumbnail_image',
                                     processors=[ResizeToFill(100, 85)],
                                     format='JPEG',
                                     options={'quality': 60})
    path = models.TextField(help_text="Embed Link for youtube or any link",
                            blank=True,
                            null=True)
    author = models.CharField(max_length=250,
                              help_text="Content Owner",
                              blank=True,
                              null=True)
    created_by = models.ForeignKey(User,
                                   blank=True,
                                   null=True,
                                   related_name="videouser_manager")
    category = models.CharField(max_length=100, choices=AUDIOVISUALCHOICES)
    published = models.BooleanField(default=False)
    sub_category = models.ForeignKey(VideoCategory,
                                     null=True,
                                     help_text='Type of Video')
    payment_status = models.CharField(max_length=100,
                                      choices=PAYMENTSTATUS,
                                      default="free",
                                      help_text="Payment Required",
                                      verbose_name='Payment Required?')
    description = fields.HTMLField(default="")

    def __str__(self):
        return self.title

    class Meta:
        verbose_name = 'Video Content Manager'
        verbose_name_plural = 'Video Content Manager'
Ejemplo n.º 16
0
class KeyNotesSetPlugin(AbstractPlugin):
    """
    Plugin for KeyNotes block.
    """
    title = models.CharField(max_length=200, blank=True)
    description = fields.HTMLField()
Ejemplo n.º 17
0
class WorkshopDescriptionPlugin(AbstractPlugin):
    """
    Parent plugin Workshop description.
    """
    title = models.CharField(max_length=200, blank=True)
    description = fields.HTMLField(blank=True)
Ejemplo n.º 18
0
class BenefitsPlugin(AbstractPlugin):
    """
    Base plugin for benefits
    """
    title = models.CharField(max_length=200, blank=True)
    description = fields.HTMLField(blank=True)
Ejemplo n.º 19
0
class SlideSharePlugin(AbstractPlugin):
    title = models.CharField(max_length=200)
    description = fields.HTMLField()
    background = models.CharField(default='grey', max_length=70, choices=SLIDE_SHARE_BACK)