Relations

We already explained that every entity in can be related to every other entity. We have relation classes for all relation types.

Models

class relations.models.AnnotationRelationLinkManager[source]

Manager used to retrieve only those relations that are highlighted in the texts. Reads out the annotation_project and users_show_highlighter session variables and provides a filter. Needs a django.request object in order to read out the session variable.

Example:

relation = PersonPlace.objects.filter(related_place='Wien').filter_ann_project(request=request)

Returns only those relations that are connected with an annotation that fits the session variables or are not connected to any annotation at all.

filter_ann_proj(request=None, ann_proj=1, include_all=True)[source]

The filter function provided by the manager class.

Parameters:requestdjango.request object
Returns:queryset that contains only objects that are shown in the highlighted text or those not connected to an annotation at all.
class relations.models.EventEvent(*args, **kwargs)[source]

Describes a relation between an Event and an Event

Parameters:
class relations.models.EventWork(*args, **kwargs)[source]

Describes a relation between an Event and a Work

Parameters:
get_web_object()[source]

Function that returns a dict that is used in html views.

Returns:dict of attributes
class relations.models.InstitutionEvent(*args, **kwargs)[source]

Describes a relation bewteen an Institution and an Event

Parameters:
class relations.models.InstitutionInstitution(*args, **kwargs)[source]

Defines and describes a relation between two Institutions

Parameters:
class relations.models.InstitutionPlace(*args, **kwargs)[source]

Describes a relation bewteen an Institution and a Place

Parameters:
class relations.models.InstitutionWork(*args, **kwargs)[source]

Describes a relation bewteen an Institution and a Work

Parameters:
class relations.models.PersonEvent(*args, **kwargs)[source]

Defines and describes a relation bewteen a Person and an Event

Parameters:
class relations.models.PersonInstitution(*args, **kwargs)[source]

Defines and describes a relation between a Person and a Institution

Parameters:
class relations.models.PersonPerson(*args, **kwargs)[source]

Defines and describes a relation between a Person and another Person

Parameters:
get_table_dict(entity)[source]

Function that returns dict used in relation tables.

Parameters:entityentities.models.Person instance that is the starting point of the table.
Returns:dict
get_web_object()[source]

Used in some html views.

Returns:Dict with object properties
class relations.models.PersonPlace(*args, **kwargs)[source]

Defines and describes a relation between a Person and a Place

Parameters:
get_web_object()[source]

Used in some html views.

Returns:Dict with object properties
class relations.models.PersonWork(*args, **kwargs)[source]

Defines and describes a relation between a Person and a Work

Parameters:
class relations.models.PlaceEvent(*args, **kwargs)[source]

Describes a relation between an Place and an Event

Parameters:
get_web_object()[source]

Function that returns a dict that is used in html views.

Returns:dict of attributes
class relations.models.PlacePlace(*args, **kwargs)[source]

Describes a relation bewteen an Place and a Place

Parameters:
get_table_dict(entity)[source]

Dict for the tabels in the html view

Parameters:entity – Object of type entities.models.Place; Used to determine which Place is the main antity and which one the related.
Returns:
get_web_object()[source]

Used in some html views.

Returns:Dict with object properties
class relations.models.PlaceWork(*args, **kwargs)[source]

Describes a relation between an Place and a Work

Parameters:
get_web_object()[source]

Function that returns a dict that is used in html views.

Returns:dict of attributes
class relations.models.WorkWork(*args, **kwargs)[source]

Describes a relation between an Work and a Work

Parameters:

Views

relations.views.get_form_ajax(request)[source]

Returns forms rendered in html

relations.views.save_ajax_form(request, entity_type, kind_form, SiteID, ObjectID=False)[source]

Tests validity and saves AjaxForms, returns them when validity test fails