- Language: en
43 results for super in version 2.0
-
Form handling with class-based views
- … super () . form_valid ( form ) Notes: FormView inherits TemplateResponseMixin so template_name can be used here …
-
The syndication feed framework
- … super () . get_context_data ( ** kwargs ) context [ 'foo' ] = 'bar' return context And the template …
-
Customizing authentication in Django
- … super() to retain the normalization. classmethod get_email_field_name () New in Django 1.11. Returns …
-
Widgets
- … super () . __init__ ( * args , ** kwargs ) self . fields [ 'name' ] . widget . attrs . update ({ 'class' : 'special …
-
Models
- … super () . save ( * args , ** kwargs ) # Call the "real" save() method. do_something_else () You can also …
-
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 …
-
Managers
- … super () . get_queryset () . filter ( author = 'Roald Dahl' ) # Then hook it into the Book …
-
Generic display views
- … super () . get_context_data ( ** kwargs ) context [ 'now' ] = timezone . now () return context Example myapp/urls.py …
-
Form fields
- … super () . __init__ ( error_messages = error_messages , fields = fields , require_all_fields = False , ** kwargs ) widget Must …