Commit 41c83b17 authored by Sli's avatar Sli
Browse files

Merge branch 'nabos' into 'master'

Changed default display time for posters and permissions on it

See merge request !142
parents d83bb205 cbd333eb
Pipeline #1456 passed with stage
in 13 minutes and 57 seconds
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('com', '0004_auto_20171221_1614'),
]
operations = [
migrations.AlterField(
model_name='poster',
name='display_time',
field=models.IntegerField(verbose_name='display time', default=15),
),
]
......@@ -212,7 +212,7 @@ class Poster(models.Model):
screens = models.ManyToManyField(Screen, related_name="posters")
date_begin = models.DateTimeField(blank=False, null=False, default=timezone.now)
date_end = models.DateTimeField(blank=True, null=True)
display_time = models.IntegerField(_("display time"), blank=False, null=False, default=30)
display_time = models.IntegerField(_("display time"), blank=False, null=False, default=15)
is_moderated = models.BooleanField(_("is moderated"), default=False)
moderator = models.ForeignKey(User, related_name="moderated_posters", verbose_name=_("moderator"), null=True, blank=True)
......
......@@ -72,6 +72,7 @@ class PosterForm(forms.ModelForm):
if self.user:
if not self.user.is_com_admin:
self.fields['club'].queryset = Club.objects.filter(id__in=self.user.clubs_with_rights)
self.fields['display_time'].widget = forms.HiddenInput()
class ComTabsMixin(TabedViewMixin):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment