Beispiel #1
0
class Investor(unobase_models.ContentModel):

    objects = models.Manager()
    permitted = unobase_models.StateManager()

    def __unicode__(self):
        return u'%s' % self.title
Beispiel #2
0
class PressRelease(unobase_models.ContentModel):

    objects = models.Manager()
    permitted = unobase_models.StateManager()

    default_image_category = constants.DEFAULT_IMAGE_CATEGORY_PRESS_RELEASE

    pdf = models.FileField(upload_to='press_releases', blank=True, null=True)
Beispiel #3
0
class Career(unobase_models.ContentModel):

    objects = models.Manager()
    permitted = unobase_models.StateManager()

    position = models.CharField(max_length=100)

    def __unicode__(self):
        return u'%s' % self.position
Beispiel #4
0
class Leader(unobase_models.ContentModel):

    objects = models.Manager()
    permitted = unobase_models.StateManager()

    job_title = models.CharField(max_length=100, blank=True, null=True)

    meta_title = models.CharField(max_length=255, blank=True, null=True)
    meta_description = models.TextField(blank=True, null=True)

    def __unicode__(self):
        return u'%s' % self.title
Beispiel #5
0
class CaseStudy(unobase_models.ContentModel):

    objects = models.Manager()
    permitted = unobase_models.StateManager()

    has_detail = models.BooleanField(default=True)
    pdf = models.FileField(upload_to='case_studies', blank=True, null=True)

    quote = models.TextField(blank=True, null=True)
    quote_by = models.CharField(max_length=255, blank=True, null=True)

    def __unicode__(self):
        return u'%s' % self.title
Beispiel #6
0
class MediaCoverage(unobase_models.ContentModel):

    objects = models.Manager()
    permitted = unobase_models.StateManager()

    default_image_category = constants.DEFAULT_IMAGE_CATEGORY_MEDIA_COVERAGE

    pdf = models.FileField(upload_to='media_coverages', blank=True, null=True)
    external_link = models.URLField(blank=True, null=True)
    image_name = models.CharField(max_length=100,
                                  blank=True,
                                  null=True,
                                  unique=True)
Beispiel #7
0
class Event(unobase_models.ContentModel):

    objects = models.Manager()
    permitted = unobase_models.StateManager()

    default_image_category = constants.DEFAULT_IMAGE_CATEGORY_EVENT

    start_date = models.DateField()
    start_time = models.TimeField(blank=True, null=True)
    end_date = models.DateField(blank=True, null=True)
    end_time = models.TimeField(blank=True, null=True)
    external_link = models.URLField(blank=True, null=True)
    image_name = models.CharField(max_length=100,
                                  blank=True,
                                  null=True,
                                  unique=True)

    def save(self, *args, **kwargs):
        return super(Event, self).save(*args, **kwargs)
Beispiel #8
0
class Resource(unobase_models.ContentModel):

    objects = models.Manager()
    permitted = unobase_models.StateManager()

    default_image_category = constants.DEFAULT_IMAGE_CATEGORY_RESOURCE

    pdf = models.FileField(upload_to='resources', blank=True, null=True)
    external_link = models.URLField(blank=True, null=True)
    featured = models.BooleanField(default=False)
    image_name = models.CharField(max_length=100,
                                  blank=True,
                                  null=True,
                                  unique=True)
    type = models.CharField(max_length=255, choices=constants.RESOURCE_TYPES)

    @property
    def resource_url(self):
        #         if self.type in ['whitepapers', 'datasheets']:
        #             return self.pdf.url

        return self.external_link