# Path: registrasion/models/conditions.py
# class TimeOrStockLimitCondition(models.Model):
#     class Meta:
# class VoucherCondition(models.Model):
#     class Meta:
# class IncludedProductCondition(models.Model):
#     class Meta:
# class SpeakerCondition(models.Model):
#     class Meta:
# class GroupMemberCondition(models.Model):
#     class Meta:
# class DiscountBase(models.Model):
#     class Meta:
# class DiscountForProduct(models.Model):
#     class Meta:
# class DiscountForCategory(models.Model):
#     class Meta:
# class TimeOrStockLimitDiscount(TimeOrStockLimitCondition, DiscountBase):
#     class Meta:
# class VoucherDiscount(VoucherCondition, DiscountBase):
#     class Meta:
# class IncludedProductDiscount(IncludedProductCondition, DiscountBase):
#     class Meta:
# class SpeakerDiscount(SpeakerCondition, DiscountBase):
#     class Meta:
# class GroupMemberDiscount(GroupMemberCondition, DiscountBase):
#     class Meta:
# class FlagBase(models.Model):
# class TimeOrStockLimitFlag(TimeOrStockLimitCondition, FlagBase):
#     class Meta:
# class ProductFlag(IncludedProductCondition, FlagBase):
#     class Meta:
# class CategoryFlag(FlagBase):
#     class Meta:
# class VoucherFlag(VoucherCondition, FlagBase):
#     class Meta:
# class SpeakerFlag(SpeakerCondition, FlagBase):
#     class Meta:
# class GroupMemberFlag(GroupMemberCondition, FlagBase):
#     class Meta:
#     def __str__(self):
#     def effects(self):
#     def __str__(self):
#     def clean(self):
#     def __str__(self):
#     def clean(self):
#     def __str__(self):
#     def effects(self):
#     def is_disable_if_false(self):
#     def is_enable_if_true(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     DISABLE_IF_FALSE = 1
#     ENABLE_IF_TRUE = 2
# 
# Path: registrasion/models/inventory.py
# class Category(models.Model):
#     class Meta:
# class Product(models.Model):
#     class Meta:
# class Voucher(models.Model):
#     class Meta:
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def normalise_code(cls, code):
#     def save(self, *a, **k):
#     RENDER_TYPE_RADIO = 1
#     RENDER_TYPE_QUANTITY = 2
#     RENDER_TYPE_ITEM_QUANTITY = 3
#     RENDER_TYPE_CHECKBOX = 4
#     CATEGORY_RENDER_TYPES = [
#         (RENDER_TYPE_RADIO, _("Radio button")),
#         (RENDER_TYPE_QUANTITY, _("Quantity boxes")),
#         (RENDER_TYPE_ITEM_QUANTITY, _("Product selector and quantity box")),
#         (RENDER_TYPE_CHECKBOX, _("Checkbox button")),
#     ]
#     RESERVATION_DURATION = datetime.timedelta(hours=1)


from django.contrib import admin
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext_lazy as _
from registrasion.models import conditions
from registrasion.models import inventory
import nested_admin
    list_display = ("description", "effects")

    inlines = [
        DiscountForProductInline,
        DiscountForCategoryInline,
    ]


# Vouchers

class VoucherDiscountInline(nested_admin.NestedStackedInline):
    model = conditions.VoucherDiscount
    verbose_name = _("Discount")

    # TODO work out why we're allowed to add more than one?
    max_num = 1
    extra = 1
    inlines = [
        DiscountForProductInline,
        DiscountForCategoryInline,
    ]


class VoucherFlagInline(nested_admin.NestedStackedInline):
    model = conditions.VoucherFlag
    verbose_name = _("Product and category enabled by voucher")
    verbose_name_plural = _("Products and categories enabled by voucher")

    # TODO work out why we're allowed to add more than one?
    max_num = 1

# Path: registrasion/models/conditions.py
# class TimeOrStockLimitCondition(models.Model):
#     class Meta:
# class VoucherCondition(models.Model):
#     class Meta:
# class IncludedProductCondition(models.Model):
#     class Meta:
# class SpeakerCondition(models.Model):
#     class Meta:
# class GroupMemberCondition(models.Model):
#     class Meta:
# class DiscountBase(models.Model):
#     class Meta:
# class DiscountForProduct(models.Model):
#     class Meta:
# class DiscountForCategory(models.Model):
#     class Meta:
# class TimeOrStockLimitDiscount(TimeOrStockLimitCondition, DiscountBase):
#     class Meta:
# class VoucherDiscount(VoucherCondition, DiscountBase):
#     class Meta:
# class IncludedProductDiscount(IncludedProductCondition, DiscountBase):
#     class Meta:
# class SpeakerDiscount(SpeakerCondition, DiscountBase):
#     class Meta:
# class GroupMemberDiscount(GroupMemberCondition, DiscountBase):
#     class Meta:
# class FlagBase(models.Model):
# class TimeOrStockLimitFlag(TimeOrStockLimitCondition, FlagBase):
#     class Meta:
# class ProductFlag(IncludedProductCondition, FlagBase):
#     class Meta:
# class CategoryFlag(FlagBase):
#     class Meta:
# class VoucherFlag(VoucherCondition, FlagBase):
#     class Meta:
# class SpeakerFlag(SpeakerCondition, FlagBase):
#     class Meta:
# class GroupMemberFlag(GroupMemberCondition, FlagBase):
#     class Meta:
#     def __str__(self):
#     def effects(self):
#     def __str__(self):
#     def clean(self):
#     def __str__(self):
#     def clean(self):
#     def __str__(self):
#     def effects(self):
#     def is_disable_if_false(self):
#     def is_enable_if_true(self):
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     DISABLE_IF_FALSE = 1
#     ENABLE_IF_TRUE = 2
# 
# Path: registrasion/models/inventory.py
# class Category(models.Model):
#     class Meta:
# class Product(models.Model):
#     class Meta:
# class Voucher(models.Model):
#     class Meta:
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def normalise_code(cls, code):
#     def save(self, *a, **k):
#     RENDER_TYPE_RADIO = 1
#     RENDER_TYPE_QUANTITY = 2
#     RENDER_TYPE_ITEM_QUANTITY = 3
#     RENDER_TYPE_CHECKBOX = 4
#     CATEGORY_RENDER_TYPES = [
#         (RENDER_TYPE_RADIO, _("Radio button")),
#         (RENDER_TYPE_QUANTITY, _("Quantity boxes")),
#         (RENDER_TYPE_ITEM_QUANTITY, _("Product selector and quantity box")),
#         (RENDER_TYPE_CHECKBOX, _("Checkbox button")),
#     ]
#     RESERVATION_DURATION = datetime.timedelta(hours=1)


# Path: registrasion/admin.py
from django.contrib import admin
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext_lazy as _
from registrasion.models import conditions
from registrasion.models import inventory
import nested_admin

    list_display = ("description", "effects")

    inlines = [
        DiscountForProductInline,
        DiscountForCategoryInline,
    ]


# Vouchers

class VoucherDiscountInline(nested_admin.NestedStackedInline):
    model = conditions.VoucherDiscount
    verbose_name = _("Discount")

    # TODO work out why we're allowed to add more than one?
    max_num = 1
    extra = 1
    inlines = [
        DiscountForProductInline,
        DiscountForCategoryInline,
    ]


class VoucherFlagInline(nested_admin.NestedStackedInline):
    model = conditions.VoucherFlag
    verbose_name = _("Product and category enabled by voucher")
    verbose_name_plural = _("Products and categories enabled by voucher")

    # TODO work out why we're allowed to add more than one?
    max_num = 1

    extra = 1