- Language: en
18 results for super in version 1.10
-
Using mixins with class-based views
- … super ( PublisherDetail , self ) . get ( request , * args , ** kwargs ) def get_context_data ( self , ** kwargs ): context = super …
-
Multiple databases
- … super() ) or do the appropriate handling of the _db attribute on the manager (a string …
-
Testing tools
- … super implementation: class MyTestCase ( TestCase ): @classmethod def setUpClass ( cls ): super ( MyTestCase , cls ) . setUpClass () ... @classmethod def tearDownClass …
-
Built-in class-based generic views
- … super), any children of that class will also need to explicitly set it after super …
-
Form handling with class-based views
- … super ( ContactView , self ) . form_valid ( form ) Notes: FormView inherits TemplateResponseMixin so template_name can be used …
-
Creating forms from models
- … super ( BaseAuthorFormSet , self ) . __init__ ( * args , ** kwargs ) self . queryset = Author . objects . filter ( name__startswith = 'O' ) Then …
-
System check framework
- … super ( RangedIntegerField , self ) . __init__ ( ** kwargs ) self . min = min self . max = max def check ( self , ** kwargs …
-
Formsets
- … super ( BaseArticleFormSet , self ) . add_fields ( form , index ) ... form . fields [ "my_field" ] = forms . CharField …
-
Managers
- … super ( DahlBookManager , self ) . get_queryset () . filter ( author = 'Roald Dahl' ) # Then hook it into …
-
Models
- … super ( Blog , self ) . save ( * args , ** kwargs ) # Call the "real" save() method. do_something …