add support for choosing a pig for events
This commit is contained in:
@ -164,6 +164,23 @@ class EventPage(Page):
|
||||
blank=True,
|
||||
)
|
||||
|
||||
PIG_CHOICES = [
|
||||
("", "Ingen"),
|
||||
("logo", "Logogrisen"),
|
||||
("music", "Musikergrisen"),
|
||||
("drink", "Drikkegrisen"),
|
||||
("dance", "Dansegrisen"),
|
||||
("point", "Pekegrisen"),
|
||||
("student", "Studentgrisen"),
|
||||
("listen", "Lyttegrisen"),
|
||||
("guard", "Vaktgrisen"),
|
||||
("key", "Nøkkelgrisen"),
|
||||
("chill", "Liggegrisen"),
|
||||
("peek", "Tittegrisen"),
|
||||
]
|
||||
|
||||
pig = models.CharField(max_length=32, choices=PIG_CHOICES, default="", blank=True)
|
||||
|
||||
ticket_url = models.URLField(
|
||||
blank=True,
|
||||
max_length=512,
|
||||
@ -197,6 +214,7 @@ class EventPage(Page):
|
||||
FieldPanel("body"),
|
||||
FieldPanel("categories", widget=forms.CheckboxSelectMultiple),
|
||||
FieldPanel("organizers", widget=forms.SelectMultiple),
|
||||
FieldPanel("pig", heading="Bakgrunnsgris"),
|
||||
FieldPanel(
|
||||
"facebook_url",
|
||||
heading="Facebook-lenke",
|
||||
@ -223,6 +241,7 @@ class EventPage(Page):
|
||||
graphql_fields = [
|
||||
GraphQLImage("featured_image"),
|
||||
GraphQLStreamfield("body"),
|
||||
GraphQLString("pig"),
|
||||
GraphQLString("ticket_url"),
|
||||
GraphQLString("facebook_url"),
|
||||
GraphQLInt("price_regular"),
|
||||
|
Reference in New Issue
Block a user