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
I need to limit the events displayed by the calendars to the city where the events will take place so I defined a model that inherits directly from Event like this:
from schedule.models import events
from city_app.models import City
class CityEvent(events.Event):
city = models.ForeignKey(City, on_delete=models.CASCADE)
I hope to be able to serve this events via the same Calendar / Period system that this great package ships with.
I would like to be able to change the way GET_EVENTS_FUNC works inside CalendarByPeriodsView so that it will accept the request, the calendar, and a city object. I think I could just create another mixin CalendarByPeriodsByCityView, passing it a "city" kwarg via the url and define another get_context_data() including a different event_list value (with a custom function) but I'm reading in settings.py comments that GET_EVENTS_FUNC is a callable used to customize the event list given for a calendar and user so I wonder if this could also apply to my situation, is there a clean way to add a parameter to this function without interfering with your code or overriding it?
The text was updated successfully, but these errors were encountered:
I could painlessly turn the events.Event model of django-scheduler into a polymorphic model for downcasting by simply applying the django-polymorphic directives and migrating. I would suggest this could be a feature request of mine
I need to limit the events displayed by the calendars to the city where the events will take place so I defined a model that inherits directly from Event like this:
I hope to be able to serve this events via the same Calendar / Period system that this great package ships with.
I would like to be able to change the way
GET_EVENTS_FUNC
works insideCalendarByPeriodsView
so that it will accept the request, the calendar, and a city object. I think I could just create another mixinCalendarByPeriodsByCityView
, passing it a "city" kwarg via the url and define anotherget_context_data()
including a differentevent_list
value (with a custom function) but I'm reading in settings.py comments that GET_EVENTS_FUNC is a callable used to customize the event list given for a calendar and user so I wonder if this could also apply to my situation, is there a clean way to add a parameter to this function without interfering with your code or overriding it?The text was updated successfully, but these errors were encountered: