class FormMixinBase

from django.views.generic.edit import FormMixinBase
Hierarchy diagram Documentation Source code
type(object_or_name, bases, dict)
type(object) -> the object's type
type(name, bases, dict) -> a new type

Attributes

  Defined in
__abstractmethods__ = <attribute '__abstractmethods__' of 'type' objects> FormMixinBase
__base__ = <class 'type'> FormMixinBase
__bases__ = (<class 'type'>,) FormMixinBase
__basicsize__ = 864 FormMixinBase
__call__ = <slot wrapper '__call__' of 'type' objects> FormMixinBase
__delattr__ = <slot wrapper '__delattr__' of 'type' objects> FormMixinBase
__dictoffset__ = 264 FormMixinBase
__dir__ = <method '__dir__' of 'type' objects> FormMixinBase
__flags__ = 2148292097 FormMixinBase
__getattribute__ = <slot wrapper '__getattribute__' of 'type' objects> FormMixinBase
__init__ = <slot wrapper '__init__' of 'type' objects> FormMixinBase
__instancecheck__ = <method '__instancecheck__' of 'type' objects> FormMixinBase
__itemsize__ = 40 FormMixinBase
__mro__ = (<class 'django.views.generic.edit.FormMixinBase'>, <class 'type'>, <class 'object'>) FormMixinBase
__qualname__ = 'FormMixinBase' FormMixinBase
__repr__ = <slot wrapper '__repr__' of 'type' objects> FormMixinBase
__setattr__ = <slot wrapper '__setattr__' of 'type' objects> FormMixinBase
__sizeof__ = <method '__sizeof__' of 'type' objects> FormMixinBase
__subclasscheck__ = <method '__subclasscheck__' of 'type' objects> FormMixinBase
__subclasses__ = <method '__subclasses__' of 'type' objects> FormMixinBase
__text_signature__ = None FormMixinBase
__weakrefoffset__ = 368 FormMixinBase
mro = <method 'mro' of 'type' objects> FormMixinBase
Expand Collapse

Methods

def __new__(cls, name, bases, attrs): FormMixinBase

Create and return a new object.  See help(type) for accurate signature.
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
def __new__(cls, name, bases, attrs):
    get_form = attrs.get('get_form')
    if get_form and inspect.isfunction(get_form):
        try:
            inspect.getcallargs(get_form, None)
        except TypeError:
            warnings.warn(
                "`%s.%s.get_form` method must define a default value for "
                "its `form_class` argument." % (attrs['__module__'], name),
                RemovedInDjango110Warning, stacklevel=2
            )
            def get_form_with_form_class(self, form_class=None):
                if form_class is None:
                    form_class = self.get_form_class()
                return get_form(self, form_class=form_class)
            attrs['get_form'] = get_form_with_form_class
    return super(FormMixinBase, cls).__new__(cls, name, bases, attrs)