django_program.sponsors.models

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

Classes

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.

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