- Language: en
10 results for isinstance in version 2.0
-
Django 1.10.1 release notes
- … isinstance(field, models.ManyToManyField) since it turned out the checks weren’t suitable to be generalized …
-
Serializing Django objects
- … isinstance ( obj , YourCustomType ): return str ( obj ) return super () . default ( obj ) You can then pass cls=LazyEncoder …
-
QuerySet API reference
- … isinstance ( Entry . objects . none (), EmptyQuerySet ) True all() all () Returns a copy of the current QuerySet …
-
Logging
- … isinstance ( exc_value , UnreadablePostError ): return False return True and then add it to your logging …
-
Django 1.7 release notes
- … isinstance ( error_list , self . error_class ): self . _errors [ field ] = self . error_class ( error_list ) Behavior …
-
Custom template tags and filters
- … isinstance ( value , SafeText ): # Do something with the "safe" string. ... Template filter code falls …
-
Model field reference
- … isinstance checks when you need to write code that depends on a field’s functionality …
-
Django 1.6 release notes
- … isinstance(qs.none(), EmptyQuerySet) If your CSS/JavaScript code used to access HTML input widgets by type …
-
The Django admin site
- … isinstance ( inline , MyInline ) and obj is None : continue yield inline . get_formset ( request , obj ), inline …
-
Writing custom model fields
- … isinstance ( value , Hand ): return value if value is None : return value return parse_hand ( value …