- Language: en
48 results for super in version 3.2
-
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 …
-
Widgets
- … super () . __init__ ( * args , ** kwargs ) self . fields [ 'name' ] . widget . attrs . update ({ 'class' : 'special …
-
System check framework
- … super () . __init__ ( ** kwargs ) self . min = min self . max = max def check ( self , ** kwargs ): # Call the superclass …
-
Models
- … super () . save ( * args , ** kwargs ) # Call the "real" save() method. do_something_else () You can also …
-
Form fields
- … super () . __init__ ( error_messages = error_messages , fields = fields , require_all_fields = False , ** kwargs ) widget Must …
-
Managers
- … super () . get_queryset () . filter ( author = 'Roald Dahl' ) # Then hook it into the Book …
-
Base views
- … super() . dispatch ( request , * args , ** kwargs ) The view part of the view – the method that accepts …
-
File Uploads
- … super () . __init__ ( * args , ** kwargs ) def clean ( self , data , initial = None ): single_file_clean = super () . clean …
-
Writing custom django-admin commands
- … super () . __init__ ( * args , ** kwargs ) # ... BaseCommand. create_parser ( prog_name , subcommand , ** kwargs ) [source] Returns a CommandParser …