django_program.sponsors.models

Sponsor level, sponsor, benefit, and bulk purchase models for django-program.

Classes

BulkPurchase

Tracks a sponsor's bulk voucher purchase order.

BulkPurchaseVoucher

Links a bulk purchase to its generated voucher codes.

Sponsor

A sponsoring organization for a conference.

SponsorBenefit

A specific benefit tracked for a sponsor.

SponsorLevel

A sponsorship tier for a conference.

SponsorOverride

Local override applied on top of sponsor data.

class django_program.sponsors.models.SponsorLevel[source]

Bases: Model

A sponsorship tier for a conference.

Defines a named tier (e.g. “Gold”, “Silver”, “Bronze”) with pricing, a description of included benefits, and the number of complimentary tickets that sponsors at this level receive automatically.

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.parent is a ForwardManyToOneDescriptor instance.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

slug

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

cost

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.

benefits_summary

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

comp_ticket_count

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

order

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.

save(*args, **kwargs)[source]

Auto-generate slug from name if not set.

Parameters:
Return type:

None

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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)
id

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>
sponsor_overrides

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

sponsors

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class django_program.sponsors.models.Sponsor[source]

Bases: Model

A sponsoring organization for a conference.

Represents a company or organization that has purchased a sponsorship package. Each sponsor belongs to a single level and conference, with contact details and branding assets for the conference website.

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.parent is a ForwardManyToOneDescriptor instance.

level

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.parent is a ForwardManyToOneDescriptor instance.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

slug

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

external_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

website_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

logo_url

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.

contact_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

contact_email

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.

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.

save(*args, **kwargs)[source]

Auto-generate slug from name if not set.

Parameters:
Return type:

None

clean()[source]

Validate that the sponsor’s level belongs to the same conference.

Return type:

None

property effective_name: str

Return the overridden value if set, otherwise the synced value.

property effective_description: str

Return the overridden value if set, otherwise the synced value.

property effective_website_url: str

Return the overridden value if set, otherwise the synced value.

property effective_logo_url: str

Return the overridden value if set, otherwise the synced value.

property effective_contact_name: str

Return the overridden value if set, otherwise the synced value.

property effective_contact_email: str

Return the overridden value if set, otherwise the synced value.

property effective_is_active: bool

Return the overridden value if set, otherwise the synced value.

property effective_level: SponsorLevel

Return the overridden value if set, otherwise the synced value.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

benefits

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

bulk_purchases

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

level_id
objects = <django.db.models.manager.Manager object>
override

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

class django_program.sponsors.models.SponsorOverride[source]

Bases: AbstractOverride

Local override applied on top of sponsor data.

Allows conference organizers to patch individual fields of a sponsor without modifying the original record. Inherits save()/clean() conference auto-set and validation from AbstractOverride.

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.parent is a ForwardManyToOneDescriptor instance.

created_by

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.parent is a ForwardManyToOneDescriptor instance.

sponsor

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

override_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

override_description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

override_website_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

override_logo_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

override_contact_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

override_contact_email

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

override_is_active

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

override_level

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.parent is a ForwardManyToOneDescriptor instance.

property is_empty: bool

Return True when no override fields carry a value.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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.

created_by_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)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

note

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>
override_level_id
sponsor_id
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.sponsors.models.SponsorBenefit[source]

Bases: Model

A specific benefit tracked for a sponsor.

Tracks individual deliverables owed to a sponsor as part of their sponsorship package (e.g. “Logo on website”, “Booth space”). The is_complete flag marks whether the benefit has been fulfilled.

sponsor

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.parent is a ForwardManyToOneDescriptor instance.

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_complete

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

notes

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.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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.

objects = <django.db.models.manager.Manager object>
sponsor_id
class django_program.sponsors.models.BulkPurchase[source]

Bases: Model

Tracks a sponsor’s bulk voucher purchase order.

Represents a request by a sponsor to purchase a batch of voucher codes (e.g. discounted or comp tickets for employees/clients). Stores the payment lifecycle, Stripe references, and the voucher generation configuration used when the purchase is fulfilled.

class PaymentStatus[source]

Bases: TextChoices

Payment lifecycle states for a bulk purchase.

PENDING = 'pending'
APPROVED = 'approved'
PROCESSING = 'processing'
PAID = 'paid'
FAILED = 'failed'
REFUNDED = 'refunded'
__new__(value)
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.parent is a ForwardManyToOneDescriptor instance.

sponsor

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.parent is a ForwardManyToOneDescriptor instance.

quantity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

product_description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

ticket_type

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.parent is a ForwardManyToOneDescriptor instance.

addon

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.parent is a ForwardManyToOneDescriptor instance.

payment_status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_payment_intent_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_checkout_session_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

unit_price

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

total_amount

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

voucher_config

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

requested_by

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.parent is a ForwardManyToOneDescriptor instance.

approved_by

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.parent is a ForwardManyToOneDescriptor instance.

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.

clean()[source]

Validate sponsor/conference consistency and bulk eligibility.

Return type:

None

property computed_total: Decimal

Return unit_price * quantity for verification against total_amount.

property vouchers_generated: int

Return the number of vouchers already generated for this purchase.

property is_fulfilled: bool

Return True when all vouchers have been generated.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

addon_id
approved_by_id
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_payment_status_display(*, field=<django.db.models.fields.CharField: payment_status>)
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.

objects = <django.db.models.manager.Manager object>
requested_by_id
sponsor_id
ticket_type_id
vouchers

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class django_program.sponsors.models.BulkPurchaseVoucher[source]

Bases: Model

Links a bulk purchase to its generated voucher codes.

Acts as a join table between BulkPurchase and the registration app’s Voucher model, tracking which vouchers were created as part of a given bulk order.

bulk_purchase

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.parent is a ForwardManyToOneDescriptor instance.

voucher

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.parent is a ForwardManyToOneDescriptor instance.

created_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

bulk_purchase_id
get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_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.

objects = <django.db.models.manager.Manager object>
voucher_id