Files @ d4b0b52253ae
Branch filter:

Location: symposion_app/pinaxcon/proposals/models.py

Joel Addison
Registrasion updates

Show applied vouchers on attendee registration admin page.
Add head title and page title to more areas.
Update the dashboard to show warning for empty categories and have
button to open voucher page.
Fix exception on attendee page when user does not have attendee object.
from django.db import models

from symposion.proposals.models import ProposalBase


class Proposal(ProposalBase):

    TARGET_USER = 1
    TARGET_BUSINESS = 2
    TARGET_COMMUNITY = 3
    TARGET_DEVELOPER = 4

    TARGET_AUIDENCES = [
        (TARGET_USER, "User"),
        (TARGET_BUSINESS, "Business"),
        (TARGET_COMMUNITY, "Community"),
        (TARGET_DEVELOPER, "Developer"),
    ]

    target_audience = models.IntegerField(choices=TARGET_AUIDENCES)

    recording_release = models.BooleanField(
        default=True,
        help_text="I allow Linux Australia to release any recordings of "
        "presentations covered by this proposal, under the <a "
        "href='https://creativecommons.org/licenses/by-sa/3.0/au/deed.en'> "
        "Creative Commons Attribution-Share Alike Australia 3.0 Licence</a>"
    )

    materials_release = models.BooleanField(
        default=True,
        help_text="I allow Linux Australia to release any other material "
        "(such as slides) from presentations covered by this proposal, under "
        "the <a "
        "href='https://creativecommons.org/licenses/by-sa/3.0/au/deed.en'> "
        "Creative Commons Attribution-Share Alike Australia 3.0 Licence</a>"
    )

    class Meta:
        abstract = True


class TalkProposal(Proposal):

    class Meta:
        verbose_name = "talk proposal"


class TutorialProposal(Proposal):

    class Meta:
        verbose_name = "tutorial proposal"


class MiniconfProposal(Proposal):

    target_audience = models.IntegerField(choices=Proposal.TARGET_AUIDENCES,
                                          default=Proposal.TARGET_DEVELOPER)

    class Meta:
        verbose_name = "miniconf proposal"


### LCA2020 Miniconfs

class MiniconfSessionProposal(Proposal):

    FORMAT_SHORT_PRESENTATION = 1
    FORMAT_MEDIUM_PRESENTATION = 2
    FORMAT_LONG_PRESENTATION = 3
    FORMAT_DEMONSTRATION = 4
    FORMAT_OTHER = 5

    TALK_FORMATS = [
        (FORMAT_SHORT_PRESENTATION, "Lightning Talk (5-10 min)"),
        (FORMAT_MEDIUM_PRESENTATION, "Short Presentation (20-25 min)"),
        (FORMAT_LONG_PRESENTATION, "Presentation (40-45 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=FORMAT_LONG_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    ticket_acknowledgement = models.BooleanField(
        default=False,
        help_text="I understand that I will be required to purchase a conference ticket "
        "and arrange my own travel and accommodation, as linux.conf.au miniconfs are unfunded community run events."
    )

    class Meta:
        abstract = True


class ContainersProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Lightning Talk (5-10 min)"),
        (MiniconfSessionProposal.FORMAT_MEDIUM_PRESENTATION, "Short Presentation (20-25 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Presentation (40-45 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_LONG_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "Containers Miniconf Proposal"


class CreativeArtsProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Short Presentation (15 min)"),
        (MiniconfSessionProposal.FORMAT_MEDIUM_PRESENTATION, "Medium Presentation (30 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Long Presentation (60 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "Creative Arts Miniconf Proposal"


class DocsProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Lightning Talk (5-10 min)"),
        (MiniconfSessionProposal.FORMAT_MEDIUM_PRESENTATION, "Short Presentation (20-25 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Presentation (40-45 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_LONG_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "Documentation Miniconf Proposal"


class FreeBsdProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Short Presentation (25 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Presentation (30 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_LONG_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "FreeBSD Miniconf Proposal"


class GamesProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Presentation (short)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Presentation (long)"),
        (MiniconfSessionProposal.FORMAT_DEMONSTRATION, "Demonstration"),
        (MiniconfSessionProposal.FORMAT_OTHER, "Other"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_LONG_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "Games and FOSS Miniconf Proposal"


class GlamProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Lightning Talk (5-10 min)"),
        (MiniconfSessionProposal.FORMAT_MEDIUM_PRESENTATION, "Short Presentation (20-25 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Presentation (40-45 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_LONG_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "GO GLAM Miniconf Proposal"


class KernelProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Short Presentation (25 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Presentation (45 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_LONG_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "Kernel Miniconf Proposal"


class OpenEducationProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Lightning Talk (5-10 min)"),
        (MiniconfSessionProposal.FORMAT_MEDIUM_PRESENTATION, "Short Presentation (20-25 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Presentation (40-45 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_LONG_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "Open Education Miniconf Proposal"


class OpenHardwareProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Lightning Talks (5 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Presentation (25 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_LONG_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "Open Hardware Miniconf Proposal"


class OpenIsaProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Short Presentation (20-25 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Presentation (40-45 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_LONG_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "OpenISA (RISC-V, OpenPOWER, etc) Miniconf Proposal"


class SecurityProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Overview (15 min)"),
        (MiniconfSessionProposal.FORMAT_MEDIUM_PRESENTATION, "Primer (30 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Presentation (45 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "Security, Identity and Privacy Miniconf Proposal"


class SysAdminProposal(MiniconfSessionProposal):

    TALK_FORMATS = [
        (MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION, "Short Presentation (5-10 min)"),
        (MiniconfSessionProposal.FORMAT_MEDIUM_PRESENTATION, "Medium Presentation (15-20 min)"),
        (MiniconfSessionProposal.FORMAT_LONG_PRESENTATION, "Long Presentation (25-30 min)"),
    ]

    talk_format = models.IntegerField(
        choices=TALK_FORMATS,
        default=MiniconfSessionProposal.FORMAT_SHORT_PRESENTATION,
        help_text="Please indicate your preferred talk length in the private abstract field below."
    )

    class Meta:
        verbose_name = "System Administration Miniconf Proposal"