- Language: en
50 results for super in version 4.1
-
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 …
-
File Uploads
- … super () . __init__ ( * args , ** kwargs ) def clean ( self , data , initial = None ): single_file_clean = super () . clean …
-
Models
- … super () . save ( * args , ** kwargs ) # Call the "real" save() method. do_something_else () You can also …
-
Creating forms from models
- … super () . __init__ ( * args , ** kwargs ) self . queryset = Author . objects . filter ( name__startswith = 'O' ) Then …
-
System check framework
- … super () . __init__ ( ** kwargs ) self . min = min self . max = max def check ( self , ** kwargs ): # Call the superclass …
-
ModelAdmin List Filters
- … super () . lookups ( request , model_admin ) def queryset ( self , request , queryset ): if request . user . is_superuser …
-
How to create custom django-admin commands
- … super () . __init__ ( * args , ** kwargs ) # ... BaseCommand. create_parser ( prog_name , subcommand , ** kwargs ) Returns a CommandParser instance …
-
Managers
- … super () . get_queryset () . filter ( author = 'Roald Dahl' ) # Then hook it into the Book …
-
Form fields
- … super () . __init__ ( error_messages = error_messages , fields = fields , require_all_fields = False , ** kwargs ) widget Must …