Using the https://github.com/llazzaro/django-scheduler I'd like to use my own models in the calendar, they also have a start and end date.
I think there are multiple ways to solve this problem:
I would like to use the third option but I wouldn't know how to use it since a calendar is linked to a single object.
I'm new to both Python and Django, so could someone give me advice?
Django Scheduler has a quite hidden setting (not even reported in official docs) which can do the trick:
SCHEDULER_BASE_CLASSES
SCHEDULER_BASE_CLASSES = {
'Event': ['my_app.models.EventAbstract1', 'my_app.models.EventAbstract2']
'Calendar': [my_app.models.CalendarAbstract']
}
So, you can define your own abstract model and make Calendar extend it.
EDIT
As @Jheasly said in his comment, this feature is now documented.
To achieve option 3, your generic object would have a foreign key linking to an Event
object from that calendar app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With