You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
David Moore edited this page Jul 17, 2020
·
1 revision
To change the default values (or other) properties of fields I suggest using _meta.get_field Unfortunately you will have to do this on each of SimpleEventPage, MultidayEventPage and RecurringEventPage (using EventBase does not work).
e.g.
from ls.joyous.models import (SimpleEventPage, MultidayEventPage, RecurringEventPage)
for EventPage in (SimpleEventPage, MultidayEventPage, RecurringEventPage):
EventPage._meta.get_field('location').default = "New York"
EventPage._meta.get_field('website').default = "example.org"
There will be other ways to do this (signals, inheritence, Javascript), but this is probably the easiest.