-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merging events from two calendars... #42
Comments
So, if I understand correctly your site is structured something like this?
Where: Event1 and Event2 should appear in Sub-Calendar1; Event3 and Event4 should appear in Sub-Calendar2; And all the events 1,2,3,4 should appear in Home-Calendar? Joyous was designed to support just this. You don't need to "reach up" to merge in events, instead the Calendars "reach down" to pull in events. (Hope that makes sense.)
Or derive your own version of CalendarPage with some other kind of event selection. Hope that helps. |
Sorry, I didn't explain myself very well. You have the structure correct, but I want to reach up so that Sub-Calendar1 and Sub-Calendar2 show their respective child events and the events from Home-Calendar. I'm actually using a derived CalendarPage for the "sub calendars" already, which I tried to use to pull in the Home-Calendar events, which is what brought up the "Models aren't loaded yet" error. I'll make it more concrete. This is for a school district website. The top level calendar is for "All-district" events. Then under that there are individual school calendars:
So each school calendar should show its events as well as any all-district events. Thanks for the quick reply and for making some sweet software! |
Thanks for the clarification. I guess I was just looking for the question I already had an answer for :-). I think your approach in subclassing the school calendars is the correct one (more suggestions on that further down). I can't say why you are getting the "Models aren't loaded yet" error. You'll have seen it suggests that you are trying to use models before all the applications have loaded. If you can share the stack trace, I might be able to help further. For ease of implementation, would the following structure still work for you?
This would make it easier to identify what is an all-district event (e.g. Event0) and what events are specific to a school. The site could look the same to viewers, but editors would need to know where too look for the all-district events. None of the code below is tested (will be buggy), but this is my idea of how the sub-class could be implemented. If I get time I will try and get a real example working. It is an interesting exercise thinking how to extend Joyous like this. Thanks! I can see some possibilities for future changes to make this kind of thing simpler.
|
Awesome, I will dig into this and let you know what happens. Hopefully it can be useful to you to expand the project. |
I've been loving Joyous Calendar and Wagtail so much. It's just great software.
I have a main CalendarPage at the root of my site where I'd like to keep events that should display on all other calendars on the site. How would I reach back up to that calendar to display those events on a calendar that exists down the page tree? I'm using a custom class based on CalendarPage as my sub-calendars, so I tried to get the top-level CalendarPage and the merge the events, but I get a "Models aren't loaded yet." error.
Any ideas on this problem?
The text was updated successfully, but these errors were encountered: