Keeping things simple¶
Timezones? Views? Groups? Multiday-recurring events? All you wanted was a simple calendar of local one-off events! This tutorial will show you how to hide unneeded features to give your users a more streamlined interface.
In this example we will create a calendar for the gigs our band is playing.
Install Wagtail and Joyous. (See the previous tutorial for details on that.)
Create an application to hold the customisations we are going to make.
$ ./manage.py startapp gigs
Add this application to your INSTALLED_APPS setting in mysite/mysite/settings/base.py
INSTALLED_APPS = [ ... 'gigs', ... ]
Edit gigs/models.py to have
from ls.joyous.models import (MultidayEventPage, RecurringEventPage, MultidayRecurringEventPage, removeContentPanels) # Hide unwanted event types MultidayEventPage.is_creatable = False RecurringEventPage.is_creatable = False MultidayRecurringEventPage.is_creatable = False # Hide unwanted content removeContentPanels(["category", "tz", "group_page", "website"])
Start your server
$ ./manage.py runserver
And, point your web browser at
Select Home | Add child page, and add a
Calendar page. (Or if you already have, select Edit for it.)
Give the calendar a suitable
Select the Settings tab. Under VIEW OPTIONS | View choices untick the List View and Weekly View options.
- Publish this.
- Add a child-page to your calendar. Notice how there is no need to select the event type, it goes straight to creating a new simple Event page.
Details. Notice how the user is not prompted for the fields Category, TZ, Group page, or Website due to the call to
Publish your event. View the calendar again. Your event will be displayed on the date you set for it.
Notice that the links for List View and Weekly View are not shown.
Hopefully your users will find this interface easy to use.