django_teledex.fields¶
Defines helper classes used for defining GenericRelation on models.
See Usage.
-
class
django_teledex.fields.AddressRelation(related_query_name, **kwargs)[source]¶ Bases:
django_teledex.fields.BaseRelationHelper used to map your own model to an
django_teledex.models.AddressThis class can be used to setup the GenericRelation between your own model and an
django_teledex.models.Address.
-
class
django_teledex.fields.BaseRelation(to, related_query_name, **kwargs)[source]¶ Bases:
django.contrib.contenttypes.fields.GenericRelationHelper class useful for automatically setting
content_type_fieldandobject_id_field.
-
class
django_teledex.fields.EmailRelation(related_query_name, **kwargs)[source]¶ Bases:
django_teledex.fields.BaseRelationHelper used to map your own model to an
django_teledex.models.EmailThis class can be used to setup the GenericRelation between your own model and an
django_teledex.models.Email.
-
class
django_teledex.fields.PhoneNumberRelation(related_query_name, **kwargs)[source]¶ Bases:
django_teledex.fields.BaseRelationHelper used to map your own model to an
django_teledex.models.PhoneNumberThis class can be used to setup the GenericRelation between your own model and an
django_teledex.models.PhoneNumber.