2012-11-26 10:05:51 +01:00
|
|
|
from django.db import models
|
|
|
|
|
2013-11-22 18:18:06 +01:00
|
|
|
from openslides.projector.models import SlideMixin
|
|
|
|
|
2012-11-26 10:05:51 +01:00
|
|
|
|
2013-11-22 18:18:06 +01:00
|
|
|
class RelatedItem(SlideMixin, models.Model):
|
|
|
|
slide_callback_name = 'test_related_item'
|
2012-11-26 10:05:51 +01:00
|
|
|
name = models.CharField(max_length='255')
|
|
|
|
|
2013-09-07 00:18:13 +02:00
|
|
|
class Meta:
|
2013-08-04 12:59:11 +02:00
|
|
|
verbose_name = 'Related Item CHFNGEJ5634DJ34F'
|
2013-09-07 00:18:13 +02:00
|
|
|
|
2012-11-26 10:05:51 +01:00
|
|
|
def get_agenda_title(self):
|
|
|
|
return self.name
|
|
|
|
|
|
|
|
def get_agenda_title_supplement(self):
|
|
|
|
return 'test item'
|
|
|
|
|
2013-11-22 18:18:06 +01:00
|
|
|
def get_absolute_url(self, link=None):
|
|
|
|
if link is None:
|
|
|
|
value = '/absolute-url-here/'
|
|
|
|
else:
|
|
|
|
value = super(RelatedItem, self).get_absolute_url(link)
|
|
|
|
return value
|
2013-05-30 01:17:24 +02:00
|
|
|
|
|
|
|
|
2013-08-04 12:59:11 +02:00
|
|
|
class BadRelatedItem(models.Model):
|
2013-09-07 00:18:13 +02:00
|
|
|
name = models.CharField(max_length='255')
|