- Language: en
16 results for _meta in version 2.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 …
-
Multiple databases
- … meta . app_label in self . route_app_labels or obj2 . _meta . app_label in self …
-
Serializing Django objects
- … Meta : unique_together = [[ 'first_name' , 'last_name' ]] class Book ( models . Model …
-
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 …
-
Tablespaces
- … Meta . This option also affects tables automatically created for ManyToManyField s in the model. You can use the DEFAULT …