django_program.registration.conditions¶
Discount and condition engine for conference registration.
Architecture¶
This module implements a composable condition/discount system that controls product eligibility and automatic price reductions. It replaces symposion’s InheritanceManager-based approach with a cleaner abstract-base + concrete-model pattern.
Design decisions:
Abstract bases, concrete conditions.
ConditionBaseandDiscountEffectare abstract Django models. Each concrete condition (e.g.SpeakerCondition) inherits both and lives in its own database table. No InheritanceManager, no polymorphic queries on a shared table.Evaluation via ``ConditionEvaluator`` service. The evaluator queries each concrete condition table in priority order, checks
evaluate()against the current user/conference context, then callscalculate_discount()for matching items. This keeps model code thin and orchestration testable.Priority-based, first-match-per-item. Conditions are ordered by
priority(lower = first). For each cart item, the first matching condition wins unless the engine is explicitly configured for stacking (future work).Condition discounts apply before voucher discounts. The cart pricing pipeline applies condition-based discounts first, then voucher discounts on the remainder.
Admin-friendly. Each condition type has its own ModelAdmin with relevant filters and M2M widgets.
Condition types¶
TimeOrStockLimitCondition– active within a time window and/or stock cap.SpeakerCondition– auto-applies to users linked to a Pretalx Speaker.GroupMemberCondition– applies to members of specified Django auth groups.IncludedProductCondition– unlocks when user has purchased enabling products.DiscountForProduct– direct discount on specific products (time/stock limited).DiscountForCategory– percentage discount on ticket types and/or add-ons.
Classes
Abstract base for all conditions that gate product eligibility or discounts. |
|
Abstract base for discount effects that reduce price. |
|
Percentage discount on all products in specified categories. |
|
Direct discount on specific products, optionally time/stock limited. |
|
Applies to members of specific Django auth groups. |
|
Unlocks discount on target products when user has purchased enabling products. |
|
Auto-applies to users linked to a Pretalx Speaker. |
|
Condition met when within a time window and/or stock limit. |
- class django_program.registration.conditions.ConditionBase[source]¶
Bases:
ModelAbstract base for all conditions that gate product eligibility or discounts.
Subclasses implement
evaluate()to determine whether the condition is met for a given user in a conference context.- conference¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- priority¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- conference_id¶
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- class django_program.registration.conditions.DiscountEffect[source]¶
Bases:
ModelAbstract base for discount effects that reduce price.
Provides the discount calculation logic shared by all condition types that can produce a price reduction.
- class DiscountType[source]¶
Bases:
TextChoicesThe type of discount to apply.
- PERCENTAGE = 'percentage'¶
- FIXED_AMOUNT = 'fixed_amount'¶
- __new__(value)¶
- discount_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_value¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- max_quantity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- applicable_ticket_types¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- applicable_addons¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- calculate_discount(unit_price, quantity)[source]¶
Calculate the discount amount for the given price and quantity.
- get_discount_type_display(*, field=<django.db.models.fields.CharField: discount_type>)¶
- class django_program.registration.conditions.TimeOrStockLimitCondition[source]¶
Bases:
ConditionBase,DiscountEffectCondition met when within a time window and/or stock limit.
Use this for early-bird discounts, flash sales, or any promotion with a defined start/end time and optional usage cap.
- start_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- end_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- limit¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- times_used¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- evaluate(user, conference)[source]¶
Return True if within the time window and stock has not been exhausted.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- applicable_addons¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- applicable_ticket_types¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- conference¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- conference_id¶
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_value¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_discount_type_display(*, field=<django.db.models.fields.CharField: discount_type>)¶
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- max_quantity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- priority¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class django_program.registration.conditions.SpeakerCondition[source]¶
Bases:
ConditionBase,DiscountEffectAuto-applies to users linked to a Pretalx Speaker.
Checks whether the user has a Speaker record in the pretalx app for the same conference, optionally filtering by presenter/copresenter role.
- is_presenter¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_copresenter¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- evaluate(user, conference)[source]¶
Return True if the user is linked to a Speaker for this conference.
Pretalx has no explicit primary/copresenter role, so any linked speaker qualifies when either flag is set. When both flags are True, any speaker qualifies. When only
is_presenteris True, any speaker on at least one talk qualifies. When onlyis_copresenteris True, the speaker must appear on a talk with at least one other speaker.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- applicable_addons¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- applicable_ticket_types¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- conference¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- conference_id¶
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_value¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_discount_type_display(*, field=<django.db.models.fields.CharField: discount_type>)¶
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- max_quantity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- priority¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class django_program.registration.conditions.GroupMemberCondition[source]¶
Bases:
ConditionBase,DiscountEffectApplies to members of specific Django auth groups.
Useful for staff discounts, volunteer pricing, or any role-based discount controlled via Django’s built-in group system.
- groups¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- evaluate(user, conference)[source]¶
Return True if the user belongs to at least one of the configured groups.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- applicable_addons¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- applicable_ticket_types¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- conference¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- conference_id¶
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_value¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_discount_type_display(*, field=<django.db.models.fields.CharField: discount_type>)¶
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- max_quantity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- priority¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class django_program.registration.conditions.IncludedProductCondition[source]¶
Bases:
ConditionBase,DiscountEffectUnlocks discount on target products when user has purchased enabling products.
For example, purchasing a “Tutorial” ticket could unlock a discount on the “Tutorial Lunch” add-on.
- enabling_ticket_types¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- evaluate(user, conference)[source]¶
Return True if the user has purchased at least one enabling ticket type.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- applicable_addons¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- applicable_ticket_types¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- conference¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- conference_id¶
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_value¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_discount_type_display(*, field=<django.db.models.fields.CharField: discount_type>)¶
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- max_quantity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- priority¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class django_program.registration.conditions.DiscountForProduct[source]¶
Bases:
ConditionBase,DiscountEffectDirect discount on specific products, optionally time/stock limited.
Unlike other conditions, this evaluates to True for all users as long as the time window and stock limit are satisfied. Use
applicable_ticket_typesandapplicable_addonsto control which products receive the discount.- start_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- end_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- limit¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- times_used¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- evaluate(user, conference)[source]¶
Return True if within the time window and stock has not been exhausted.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- applicable_addons¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- applicable_ticket_types¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- conference¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- conference_id¶
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- discount_value¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_discount_type_display(*, field=<django.db.models.fields.CharField: discount_type>)¶
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- max_quantity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- priority¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class django_program.registration.conditions.DiscountForCategory[source]¶
Bases:
ConditionBasePercentage discount on all products in specified categories.
Applies a flat percentage reduction to ticket types and/or add-ons for the conference. Does not use
DiscountEffectbecause it uses its own simplified percentage-only calculation with category-level targeting.- percentage¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- apply_to_tickets¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- apply_to_addons¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- start_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- end_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- limit¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- times_used¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- evaluate(user, conference)[source]¶
Return True if within the time window and stock has not been exhausted.
- calculate_discount(unit_price, quantity)[source]¶
Calculate the percentage discount for the given price and quantity.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- conference¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- conference_id¶
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- priority¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.