2012-02-03 20:49:16 +01:00
|
|
|
from django.db import models
|
2012-03-12 18:22:18 +01:00
|
|
|
|
|
|
|
from api import register_slidemodel
|
|
|
|
from projector import SlideMixin
|
2012-02-03 20:49:16 +01:00
|
|
|
|
2012-02-15 12:04:11 +01:00
|
|
|
from system import config
|
2012-04-14 09:28:28 +02:00
|
|
|
from utils.translation_ext import xugettext as _
|
2012-03-12 18:22:18 +01:00
|
|
|
|
|
|
|
class ProjectorSlide(models.Model, SlideMixin):
|
|
|
|
prefix = 'ProjectorSlide'
|
|
|
|
|
|
|
|
title = models.CharField(max_length=100, verbose_name=_("Title"))
|
|
|
|
text = models.TextField(null=True, blank=True, verbose_name=_("Text"))
|
|
|
|
weight = models.IntegerField(default=0, verbose_name=_("Weight"))
|
|
|
|
|
|
|
|
def __unicode__(self):
|
|
|
|
return self.title
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
permissions = (
|
2012-04-14 09:28:28 +02:00
|
|
|
('can_manage_projector', _("Can manage the projector", fixstr=True)),
|
|
|
|
('can_see_projector', _("Can see projector", fixstr=True)),
|
2012-03-12 18:22:18 +01:00
|
|
|
)
|
|
|
|
|
2012-04-14 09:47:34 +02:00
|
|
|
|
|
|
|
class ProjectorMessage(models.Model):
|
|
|
|
active = models.BooleanField(verbose_name=_('Active'))
|
|
|
|
def_name = models.CharField(max_length=64)
|
|
|
|
|
|
|
|
def __unicode__(self):
|
|
|
|
return self.def_name
|
|
|
|
|
|
|
|
|
2012-03-12 18:22:18 +01:00
|
|
|
register_slidemodel(ProjectorSlide, category=_('Projector'), model_name=_('Projector Slide'))
|
2012-03-18 17:11:58 +01:00
|
|
|
|