Undocumented
Class |
|
Provide a many-to-one relation by adding a column to the local model to hold the remote value. |
Class |
|
Abstraction of the ForeignKey relation to support multi-column relations. |
Class |
|
Provide a many-to-many relation by using an intermediary model that holds two ForeignKey fields pointed at the two sides of the relation. |
Class |
|
A OneToOneField is essentially the same as a ForeignKey, with the exception that it always carries a "unique" constraint with it and the reverse relation always returns the object pointed to (since there will only ever be one), rather than returning a list. |
Class |
|
Base class that all relational fields inherit from. |
Function | create |
Undocumented |
Function | lazy |
Schedule `function` to be called once `model` and all `related_models` have been imported and registered with the app registry. `function` will be called with the newly-loaded model classes as its positional arguments, plus any optional keyword arguments. |
Function | resolve |
Transform relation into a model or fully-qualified model string of the form "app_label.ModelName", relative to scope_model. |
Constant | RECURSIVE |
Undocumented |
Schedule `function` to be called once `model` and all `related_models` have been imported and registered with the app registry. `function` will be called with the newly-loaded model classes as its positional arguments, plus any optional keyword arguments. The `model` argument must be a model class. Each subsequent positional argument is another model, or a reference to another model - see `resolve_relation()` for the various forms these may take. Any relative references will be resolved relative to `model`. This is a convenience wrapper for `Apps.lazy_model_operation` - the app registry model used is the one found in `model._meta.apps`.
Transform relation into a model or fully-qualified model string of the form "app_label.ModelName", relative to scope_model. The relation argument can be: * RECURSIVE_RELATIONSHIP_CONSTANT, i.e. the string "self", in which case the model argument will be returned. * A bare model name without an app_label, in which case scope_model's app_label will be prepended. * An "app_label.ModelName" string. * A model class, which will be returned unchanged.