Undocumented
Class |
|
No class docstring; 0/3 instance variable, 2/7 methods documented |
Exception |
|
A field is a foreign key attname, i.e. <FK>_id. |
Exception |
|
Undocumented |
Function | construct |
Construct a JSON structure describing changes from a changed object. Translations are deactivated so that strings are stored untranslated. Translation happens later on LogEntry access. |
Function | display |
Undocumented |
Function | display |
Undocumented |
Function | flatten |
Return a list which is a single level of flattening of the original list. |
Function | flatten |
Return a list of field names from an admin fieldsets structure. |
Function | get |
Find all objects related to ``objs`` that should also be deleted. ``objs`` must be a homogeneous iterable of objects (e.g. a QuerySet). |
Function | get |
Return list of Fields given path relative to model. |
Function | get |
Undocumented |
Function | help |
Undocumented |
Function | label |
Return a sensible label for a field name. The name can be a callable, property (but not created with @property decorator), or the name of an object's attribute, as well as a model field. If return_attr is True, also return the resolved attribute (which could be a callable)... |
Function | lookup |
Undocumented |
Function | lookup |
Return True if the given lookup path spawns duplicates. |
Function | model |
Return a `dict` with keys 'verbose_name' and 'verbose_name_plural', typically for use with string formatting. |
Function | model |
Return the appropriate `verbose_name` or `verbose_name_plural` value for `obj` depending on the count `n`. |
Function | prepare |
Return a lookup value prepared to be used in queryset filtering. |
Function | quote |
Ensure that primary key values do not confuse the admin URLs by escaping any '/', '_' and ':' and similarly problematic characters. Similar to urllib.parse.quote(), except that the quoting is slightly different so that it doesn't get automatically unquoted by the web browser. |
Function | reverse |
Create a reversed field path. |
Function | unquote |
Undo the effects of quote(). |
Constant | QUOTE |
Undocumented |
Constant | UNQUOTE |
Undocumented |
Constant | UNQUOTE |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
For historical reasons, the admin app relies on GenericForeignKeys as being "not found" by get_field(). This could likely be cleaned up. |
Construct a JSON structure describing changes from a changed object. Translations are deactivated so that strings are stored untranslated. Translation happens later on LogEntry access.
Find all objects related to ``objs`` that should also be deleted. ``objs`` must be a homogeneous iterable of objects (e.g. a QuerySet). Return a nested list of strings suitable for display in the template with the ``unordered_list`` filter.
Return list of Fields given path relative to model. e.g. (ModelX, "user__groups__name") -> [ <django.db.models.fields.related.ForeignKey object at 0x...>, <django.db.models.fields.related.ManyToManyField object at 0x...>, <django.db.models.fields.CharField object at 0x...>, ]
Return a sensible label for a field name. The name can be a callable, property (but not created with @property decorator), or the name of an object's attribute, as well as a model field. If return_attr is True, also return the resolved attribute (which could be a callable). This will be None if (and only if) the name refers to a field.
Return a `dict` with keys 'verbose_name' and 'verbose_name_plural', typically for use with string formatting. `obj` may be a `Model` instance, `Model` subclass, or `QuerySet` instance.
Return the appropriate `verbose_name` or `verbose_name_plural` value for `obj` depending on the count `n`. `obj` may be a `Model` instance, `Model` subclass, or `QuerySet` instance. If `obj` is a `QuerySet` instance, `n` is optional and the length of the `QuerySet` is used.
Ensure that primary key values do not confuse the admin URLs by escaping any '/', '_' and ':' and similarly problematic characters. Similar to urllib.parse.quote(), except that the quoting is slightly different so that it doesn't get automatically unquoted by the web browser.
Create a reversed field path. E.g. Given (Order, "user__groups"), return (Group, "user__order"). Final field must be a related model, not a data field.