- Language: en
18 results for super in version 2.0
-
Using mixins with class-based views
- … super () . get ( request , * args , ** kwargs ) def get_context_data ( self , ** kwargs ): context = super () . get_context …
-
Testing tools
- … super implementation: class MyTestCase ( TestCase ): @classmethod def setUpClass ( cls ): super () . setUpClass () ... @classmethod def tearDownClass ( cls ): ... super …
-
Multiple databases
- … super() ) or do the appropriate handling of the _db attribute on the manager (a string …
-
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 () . form_valid ( form ) Notes: FormView inherits TemplateResponseMixin so template_name can be used here …
-
Creating forms from models
- … super () . __init__ ( * args , ** kwargs ) self . queryset = Author . objects . filter ( name__startswith = 'O' ) Then …
-
Customizing authentication in Django
- … super() to retain the normalization. classmethod get_email_field_name () New in Django 1.11. Returns …
-
Managers
- … super () . get_queryset () . filter ( author = 'Roald Dahl' ) # Then hook it into the Book …
-
System check framework
- … super () . __init__ ( ** kwargs ) self . min = min self . max = max def check ( self , ** kwargs ): # Call the superclass …
-
Formsets
- … super () . add_fields ( form , index ) ... form . fields [ "my_field" ] = forms . CharField () >>> ArticleFormSet …