External Calendars
This package contains all external calendar related data models:
ExternalCalendar
External Calendar
- class integreat_cms.cms.models.external_calendars.external_calendar.ExternalCalendar(*args, **kwargs)[source]
Bases:
AbstractBaseModel
Model for representing external calendars, from which events can be imported.
- Parameters:
id (BigAutoField) – Primary key: ID
name (CharField) – Calendar name
url (URLField) – URL
import_filter_category (CharField) – The category that events need to have to get imported (Leave blank to import all events)
errors (CharField) – Import errors
last_changed_on (DateTimeField) – Last changed on
Relationship fields:
- Parameters:
region (
ForeignKey
toRegion
) – Region (related name:external_calendars
)created_by (
ForeignKey
toUser
) – Creator. The account that created this external calendar. (related name:externalcalendar
)last_changed_by (
ForeignKey
toUser
) – Last changed by. The account that was the last to change this external calendar. (related name:+
)
Reverse relationships:
- Parameters:
events (Reverse
ForeignKey
fromEvent
) – All events of this external calendar (related name ofexternal_calendar
)
- exception DoesNotExist[source]
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned[source]
Bases:
MultipleObjectsReturned
- get_repr() str [source]
This overwrites the default Django
__repr__()
method- Returns:
The canonical string representation of the external calendar
- Return type:
- load_ical() Calendar [source]
Loads the url and creates an icalendar :return: The Icalendar returned by the url :raises OSError: If the url cannot be loaded :raises ValueError: If the data are not valid icalendar format
- Return type:
Calendar