Fixed #29 -- "Shop is live" flag

This commit is contained in:
Raphael Michel
2016-02-22 21:53:08 +01:00
parent 28c8cd8461
commit e29f19e96b
15 changed files with 530 additions and 152 deletions

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-22 20:02
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pretixbase', '0008_invoiceaddress'),
]
operations = [
migrations.AddField(
model_name='event',
name='live',
field=models.BooleanField(default=False, verbose_name='Shop is live'),
),
migrations.AlterField(
model_name='invoiceaddress',
name='order',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='invoice_address', to='pretixbase.Order'),
),
]

View File

@@ -32,6 +32,8 @@ class Event(LoggedModel):
:param slug: A short, alphanumeric, all-lowercase name for use in URLs. The slug has to
be unique among the events of the same organizer.
:type slug: str
:param live: Whether or not the shop is publicly accessible
:type live: bool
:param currency: The currency of all prices and payments of this event
:type currency: str
:param date_from: The datetime this event starts
@@ -65,6 +67,7 @@ class Event(LoggedModel):
],
verbose_name=_("Slug"),
)
live = models.BooleanField(default=False, verbose_name=_("Shop is live"))
permitted = models.ManyToManyField(User, through='EventPermission',
related_name="events", )
currency = models.CharField(max_length=10,