- Language: en
51 results for super in version 5.0
-
Models
- … super () . save ( * args , ** kwargs ) # Call the "real" save() method. do_something_else () You can also …
-
Widgets
- … super () . __init__ ( * args , ** kwargs ) self . fields [ "name" ] . widget . attrs . update ({ "class" : "special …
-
File Uploads
- … super () . __init__ ( * args , ** kwargs ) def clean ( self , data , initial = None ): single_file_clean = super () . clean …
-
Creating forms from models
- … super () . __init__ ( * args , ** kwargs ) self . queryset = Author . objects . filter ( name__startswith = "O" ) Then …
-
Form handling with class-based views
- … super () . form_valid ( form ) Notes: FormView inherits TemplateResponseMixin so template_name can be used here …
-
System check framework
- … super () . __init__ ( ** kwargs ) self . min = min self . max = max def check ( self , ** kwargs ): # Call the superclass …
-
Base views
- … super() . dispatch ( request , * args , ** kwargs ) The view part of the view – the method that accepts …
-
Customizing authentication in Django
- … super() to retain the normalization. classmethod get_email_field_name () Returns the name of the email …
-
ModelAdmin List Filters
- … super () . lookups ( request , model_admin ) def queryset ( self , request , queryset ): if request . user . is_superuser …
-
Formsets
- … super () . add_fields ( form , index ) ... form . fields [ "my_field" ] = forms . CharField () ... >>> ArticleFormSet …