mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed "indentation is not a multiple of four" pep8 issues.
This commit is contained in:
parent
cb98ffe8f4
commit
5649c0af9d
20 changed files with 64 additions and 60 deletions
|
@ -14,21 +14,23 @@ from django.utils.encoding import python_2_unicode_compatible
|
|||
@python_2_unicode_compatible
|
||||
class Category(models.Model):
|
||||
name = models.CharField(max_length=20)
|
||||
|
||||
class Meta:
|
||||
ordering = ('name',)
|
||||
ordering = ('name',)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Article(models.Model):
|
||||
headline = models.CharField(max_length=50)
|
||||
pub_date = models.DateTimeField()
|
||||
primary_categories = models.ManyToManyField(Category, related_name='primary_article_set')
|
||||
secondary_categories = models.ManyToManyField(Category, related_name='secondary_article_set')
|
||||
|
||||
class Meta:
|
||||
ordering = ('pub_date',)
|
||||
ordering = ('pub_date',)
|
||||
|
||||
def __str__(self):
|
||||
return self.headline
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue