mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-23 00:01:16 +00:00
Merge branch 'nabos' into 'master'
Changed default display time for posters and permissions on it See merge request ae/Sith!142
This commit is contained in:
commit
41c83b17df
19
com/migrations/0005_auto_20180318_2227.py
Normal file
19
com/migrations/0005_auto_20180318_2227.py
Normal file
@ -0,0 +1,19 @@
|
||||
# -*- 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):
|
||||
|
Loading…
Reference in New Issue
Block a user