mirror of
https://github.com/django-polymorphic/django-polymorphic.git
synced 2025-12-06 01:13:55 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
bba4b41ec2
commit
9b60339529
|
|
@ -13,6 +13,7 @@ middleware here, or combine a Django application with an application of another
|
|||
framework.
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
# This application object is used by any WSGI server configured to use this
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
This module is a scratchpad for general development, testing & debugging
|
||||
Well, even more so than pcmd.py. You best ignore p2cmd.py.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import time
|
||||
from pprint import pprint
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ ModelAdmin code to display polymorphic models.
|
|||
The admin consists of a parent admin (which shows in the admin with a list),
|
||||
and a child admin (which is used internally to show the edit/delete dialog).
|
||||
"""
|
||||
|
||||
# Admins for the regular models
|
||||
from .parentadmin import PolymorphicParentModelAdmin # noqa
|
||||
from .childadmin import PolymorphicChildModelAdmin
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
The child admin displays the change/delete view of the subclass model.
|
||||
"""
|
||||
|
||||
import inspect
|
||||
|
||||
from django.contrib import admin
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ Rendering utils for admin forms;
|
|||
|
||||
This makes sure that admin fieldsets/layout settings are exported to the template.
|
||||
"""
|
||||
|
||||
import json
|
||||
|
||||
from django.contrib.admin.helpers import AdminField, InlineAdminForm, InlineAdminFormSet
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ Django Admin support for polymorphic inlines.
|
|||
|
||||
Each row in the inline can correspond with a different subclass.
|
||||
"""
|
||||
|
||||
from functools import partial
|
||||
|
||||
from django.conf import settings
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
The parent admin displays the list view of the base model.
|
||||
"""
|
||||
|
||||
from django.contrib import admin
|
||||
from django.contrib.admin.helpers import AdminErrorList, AdminForm
|
||||
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
PolymorphicModel Meta Class
|
||||
"""
|
||||
|
||||
import inspect
|
||||
import os
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ The ``extra_views.advanced`` provides a method to combine that with a create/upd
|
|||
|
||||
This package provides classes that support both options for polymorphic formsets.
|
||||
"""
|
||||
|
||||
import extra_views
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ For every child type, there is an :class:`PolymorphicFormSetChild` instance
|
|||
that describes how to display and construct the child.
|
||||
It's parameters are very similar to the parent's factory method.
|
||||
"""
|
||||
|
||||
from .generic import ( # Can import generic here, as polymorphic already depends on the 'contenttypes' app.
|
||||
BaseGenericPolymorphicInlineFormSet,
|
||||
GenericPolymorphicFormSetChild,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
Seamless Polymorphic Inheritance for Django Models
|
||||
"""
|
||||
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.db import models
|
||||
from django.db.models.fields.related import ForwardManyToOneDescriptor, ReverseOneToOneDescriptor
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
QuerySet for PolymorphicModel
|
||||
"""
|
||||
|
||||
import copy
|
||||
from collections import defaultdict
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
PolymorphicQuerySet support functions
|
||||
"""
|
||||
|
||||
import copy
|
||||
from collections import deque
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user