Add hidden flag to raffle
This commit is contained in:
parent
ea613bccb8
commit
cd77380eac
4 changed files with 43 additions and 1 deletions
20
pinaxcon/raffle/migrations/0003_raffle_hidden.py
Normal file
20
pinaxcon/raffle/migrations/0003_raffle_hidden.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.14 on 2019-01-21 19:15
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pinaxcon_raffle', '0002_auto_20190102_1205'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='raffle',
|
||||
name='hidden',
|
||||
field=models.BooleanField(default=True),
|
||||
),
|
||||
]
|
|
@ -11,6 +11,7 @@ class Raffle(RaffleMixin, models.Model):
|
|||
"""
|
||||
description = models.CharField(max_length=255)
|
||||
products = models.ManyToManyField('registrasion.Product')
|
||||
hidden = models.BooleanField(default=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.description
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
<h1 class="mb-5">Raffle Winners</h1>
|
||||
|
||||
{% for raffle in raffles %}
|
||||
{% if raffle.hidden %}
|
||||
{% else %}
|
||||
<h2 class="mt-5">{{ raffle }}</h2>
|
||||
|
||||
<dl class="row my-4">
|
||||
|
@ -51,8 +53,8 @@
|
|||
<div class="clearfix"></div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if not forloop.last %}<hr>{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
19
vendor/symposion/schedule/migrations/0008_auto_20190122_0815.py
vendored
Normal file
19
vendor/symposion/schedule/migrations/0008_auto_20190122_0815.py
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.14 on 2019-01-21 19:15
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('symposion_schedule', '0007_auto_20161224_1709'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='slot',
|
||||
options={'ordering': ['day__schedule__section__name', 'day', 'start'], 'verbose_name': 'slot', 'verbose_name_plural': 'slots'},
|
||||
),
|
||||
]
|
Loading…
Reference in a new issue