- Language: en
16 results for _meta in version 5.2
-
Models
- … Meta : abstract = True ordering = [ "name" ] class Student ( CommonInfo ): # ... class Meta ( CommonInfo . Meta ): db_table …
-
Creating forms from models
- … Meta ( ArticleForm . Meta ): ... exclude = [ "body" ] ... This adds the extra method from the EnhancedArticleForm …
-
Translation
- … meta . verbose_name else : name = Report . _meta . verbose_name_plural text = ngettext ( "There is %(count …
-
Customizing authentication in Django
- … Meta ( UserCreationForm . Meta ): model = CustomUser fields = UserCreationForm . Meta . fields + ( "custom_field" ,) Custom users …
-
Serializing Django objects
- … meta . fields ] header = "," . join ( fields ) self . stream . write ( f "model, { header } \n " ) self …
-
Multiple databases
- … meta . app_label in self . route_app_labels or obj2 . _meta . app_label in self …
-
Composite primary keys
- … meta . pk_fields [<django.db.models.fields.AutoField: id>] >>> OrderLineItem . _meta . pk_fields [ <django.db.models.fields.ForeignKey …
-
Using the Django authentication system
- … Meta class, you can also create permissions directly. For example, you can create the can_publish …
-
Many-to-many relationships
- … Meta : ordering = [ "title" ] def __str__ ( self ): return self . title class Article ( models . Model …
-
Django’s cache framework
- … meta . app_label == "django_cache" : return "cache_replica" return None def db_for_write …