symposion_app/pinaxcon/proposals/models.py

179 lines
4.6 KiB
Python
Raw Normal View History

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_AUDIENCES = [
(TARGET_DEVELOPER, "Developer"),
2021-08-09 11:12:43 +00:00
(TARGET_COMMUNITY, "Community"),
(TARGET_USER, "End User"),
(TARGET_BUSINESS, "Business"),
]
2021-08-09 11:12:43 +00:00
target_audience = models.IntegerField(
choices=TARGET_AUDIENCES,
help_text="Who is the target audience for your session?",
)
recording_release = models.BooleanField(
default=True,
help_text="I allow Linux Australia to release any recordings of "
2021-08-09 11:12:43 +00:00
"presentations covered by this proposal, on YouTube under the "
"standard YouTube licence, and on other platforms 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
2021-08-09 11:12:43 +00:00
class SessionProposal(Proposal):
"""
Base Session Proposal
This is not a meta class as we want a single table to store the common
data across all session proposal types.
"""
TOPIC_SOFTWARE = 1
TOPIC_HARDWARE = 2
TOPIC_FIRMWARE = 3
TOPIC_KERNEL = 4
TOPIC_DOCUMENTATION = 5
TOPIC_COMMUNITY = 6
TOPIC_SECURITY = 7
TOPIC_OPERATIONS = 8
TOPIC_OTHER = 9
PROPOSAL_TOPIC = [
(TOPIC_SOFTWARE, "Software"),
(TOPIC_HARDWARE, "Hardware"),
(TOPIC_FIRMWARE, "Firmware"),
(TOPIC_KERNEL, "Linux Kernel"),
(TOPIC_DOCUMENTATION, "Documentation"),
(TOPIC_COMMUNITY, "Community"),
(TOPIC_SECURITY, "Security"),
(TOPIC_OPERATIONS, "Deployment & Operations"),
(TOPIC_OTHER, "Other"),
]
LEVEL_BEGINNER = 1
LEVEL_INTERMEDIATE = 2
LEVEL_ADVANCED = 3
EXPERIENCE_LEVEL = [
(LEVEL_BEGINNER, "Beginner"),
(LEVEL_INTERMEDIATE, "Intermediate"),
(LEVEL_ADVANCED, "Advanced"),
]
primary_topic = models.IntegerField(
choices=PROPOSAL_TOPIC,
help_text="What is the primary topic area for your session?"
)
experience_level = models.IntegerField(
choices=EXPERIENCE_LEVEL,
help_text="What level of experience will your session be pitched at?"
)
require_approval = models.BooleanField(
default=False,
help_text="Do you require further approval from your employer or "
"institution before you can confirm your availability to present?"
)
class TalkProposal(SessionProposal):
class Meta:
verbose_name = "talk proposal"
2017-03-05 07:34:15 +00:00
2021-08-09 11:12:43 +00:00
class TutorialProposal(SessionProposal):
class Meta:
verbose_name = "tutorial proposal"
2017-03-05 07:34:15 +00:00
class MiniconfProposal(Proposal):
2021-08-09 11:12:43 +00:00
"""
Miniconf Proposal
Note that this is just a Proposal, not a SessionProposal, as it does not
require a number of fields that the others use.
"""
target_audience = models.IntegerField(choices=Proposal.TARGET_AUDIENCES,
default=Proposal.TARGET_DEVELOPER)
class Meta:
verbose_name = "miniconf proposal"
2021-08-09 11:12:43 +00:00
class MiniconfSessionProposal(SessionProposal):
"""
Base Miniconf Session Proposal
"""
2021-08-09 11:12:43 +00:00
class Meta:
abstract = True
class GlamCommunityProposal(MiniconfSessionProposal):
class Meta:
verbose_name = "GO GLAM Miniconf Proposal"
class KernelProposal(MiniconfSessionProposal):
class Meta:
verbose_name = "Kernel Miniconf Proposal"
class OpenHardwareProposal(MiniconfSessionProposal):
FORMAT_PRESENTATION = 1
FORMAT_TUTORIAL = 2
FORMAT_HANDS_ON = 3
TALK_FORMATS = [
2021-08-09 11:12:43 +00:00
(FORMAT_PRESENTATION, "Presentation"),
(FORMAT_TUTORIAL, "Tutorial"),
(FORMAT_HANDS_ON, "Hands-on"),
]
talk_format = models.IntegerField(
choices=TALK_FORMATS,
2021-08-09 11:12:43 +00:00
default=FORMAT_PRESENTATION,
help_text="Will your session be a presentation, tutorial or hands-on "
"(e.g how to use KiCAD or some other tooling)?"
)
2021-08-09 11:12:43 +00:00
class Meta:
verbose_name = "Open Hardware Miniconf Proposal"
class SysAdminProposal(MiniconfSessionProposal):
class Meta:
2021-08-09 11:12:43 +00:00
verbose_name = "System Administration Miniconf Proposal"