mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
magic-removal: Renamed 'class META' to 'class Meta' in models
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1754 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -11,7 +11,7 @@ class Employee(models.Model):
|
||||
employee_code = models.CharField(maxlength=10, primary_key=True)
|
||||
first_name = models.CharField(maxlength=20)
|
||||
last_name = models.CharField(maxlength=20)
|
||||
class META:
|
||||
class Meta:
|
||||
ordering = ('last_name', 'first_name')
|
||||
|
||||
def __repr__(self):
|
||||
@@ -20,7 +20,7 @@ class Employee(models.Model):
|
||||
class Business(models.Model):
|
||||
name = models.CharField(maxlength=20, primary_key=True)
|
||||
employees = models.ManyToManyField(Employee)
|
||||
class META:
|
||||
class Meta:
|
||||
verbose_name_plural = 'businesses'
|
||||
module_name = 'businesses'
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from django.db import models
|
||||
class Article(models.Model):
|
||||
headline = models.CharField(maxlength=100)
|
||||
pub_date = models.DateTimeField()
|
||||
class META:
|
||||
class Meta:
|
||||
get_latest_by = 'pub_date'
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -9,7 +9,7 @@ from django.db import models
|
||||
class Article(models.Model):
|
||||
headline = models.CharField(maxlength=100)
|
||||
pub_date = models.DateTimeField()
|
||||
class META:
|
||||
class Meta:
|
||||
ordering = ('-pub_date', 'headline')
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -14,7 +14,7 @@ from django.db import models
|
||||
|
||||
class Category(models.Model):
|
||||
name = models.CharField(maxlength=20)
|
||||
class META:
|
||||
class Meta:
|
||||
ordering = ('name',)
|
||||
|
||||
def __repr__(self):
|
||||
@@ -27,7 +27,7 @@ class Article(models.Model):
|
||||
singular='primary_category', related_name='primary_article')
|
||||
secondary_categories = models.ManyToManyField(Category,
|
||||
singular='secondary_category', related_name='secondary_article')
|
||||
class META:
|
||||
class Meta:
|
||||
ordering = ('pub_date',)
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -11,7 +11,7 @@ from django.db import models
|
||||
class Article(models.Model):
|
||||
headline = models.CharField(maxlength=50)
|
||||
pub_date = models.DateTimeField()
|
||||
class META:
|
||||
class Meta:
|
||||
ordering = ('pub_date',)
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -18,7 +18,7 @@ from django.db import models
|
||||
class Article(models.Model):
|
||||
headline = models.CharField(maxlength=100)
|
||||
pub_date = models.DateTimeField()
|
||||
class META:
|
||||
class Meta:
|
||||
ordering = ('-pub_date', 'headline')
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
@@ -18,7 +18,7 @@ class Thing(models.Model):
|
||||
having = models.CharField(maxlength=1)
|
||||
where = models.CharField(maxlength=1)
|
||||
has_hyphen = models.CharField(maxlength=1, db_column='has-hyphen')
|
||||
class META:
|
||||
class Meta:
|
||||
db_table = 'select'
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
Reference in New Issue
Block a user