- pip install ls.joyous
- pip install holidays==0.12
for this project holidays package version 0.13 not combatable with last version of joyous, for this reason you should install version 0.12.
- add it into INSTALLED_APPS:
INSTALLED_APPS = [
...
'ls.joyous',
'wagtail.contrib.modeladmin',
...
]
-
Make sure USE_TZ is set to True at (settings.py)
USE_TZ = True
-
in your terminal:
- python manage.py migrate
- python manage.py collectstatic --no-input
- python manage.py runserver
-
in models.py
from ls.joyous.models import (MultidayEventPage, RecurringEventPage, MultidayRecurringEventPage, removeContentPanels)
-
in models.py of your app you can add this line to remove some un-wanted fields
removeContentPanels(["category", "tz", "group_page", "website"])
and you can also hide some unnecessary types of events by:MultidayEventPage.is_creatable = False RecurringEventPage.is_creatable = False MultidayRecurringEventPage.is_creatable = False
-
in setteings.py: joyous settings:
JOYOUS_THEME_CSS = "/static/joyous/css/joyous_forest_theme.css" --> joyous theme JOYOUS_HOLIDAYS = "Scotland" --> your country if holidays package support it to check it go to: https://github.com/dr-prodigy/python-holidays JOYOUS_DATE_FORMAT = "l jS \\o\\f F X" JOYOUS_DATE_SHORT_FORMAT = "j M X" JOYOUS_TIME_FORMAT = "fq" --> for times like '9am' JOYOUS_TIME_INPUT = "12" --> to enter times in the 12 hour format
django settings:
USE_TZ = True TIME_ZONE = "Europe/London" --> time zone for your country USE_I18N = True --> turns on the Django translation system. USE_L10N = True --> enables Django’s localized formatting of numbers and dates. LANGUAGE_CODE = 'en-uk'
-
go to admin site and add a
Calendar page
as a child page for your home -
add a title
-
add to your calender page a child page from these:
- Event page: a single event
- Multiday event page: multi event in a sequance days
- Multiday recurring event page
- Recurring event page
-
add event's details
-
publish it and see your calendar with your events ^^.
for more information you can go to the documentation docs