mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed E128 flake8 warnings in tests/.
This commit is contained in:
parent
df8d8d4292
commit
92053acbb9
148 changed files with 2073 additions and 2248 deletions
|
@ -116,7 +116,6 @@ class FunPerson(models.Model):
|
|||
first_name = models.CharField(max_length=30)
|
||||
last_name = models.CharField(max_length=30)
|
||||
fun = models.BooleanField(default=True)
|
||||
|
||||
favorite_book = models.ForeignKey(
|
||||
'Book',
|
||||
models.SET_NULL,
|
||||
|
@ -141,12 +140,16 @@ class Book(models.Model):
|
|||
published_objects = PublishedBookManager()
|
||||
authors = models.ManyToManyField(Person, related_name='books')
|
||||
fun_authors = models.ManyToManyField(FunPerson, related_name='books')
|
||||
|
||||
favorite_things = GenericRelation(Person,
|
||||
content_type_field='favorite_thing_type', object_id_field='favorite_thing_id')
|
||||
|
||||
fun_people_favorite_things = GenericRelation(FunPerson,
|
||||
content_type_field='favorite_thing_type', object_id_field='favorite_thing_id')
|
||||
favorite_things = GenericRelation(
|
||||
Person,
|
||||
content_type_field='favorite_thing_type',
|
||||
object_id_field='favorite_thing_id',
|
||||
)
|
||||
fun_people_favorite_things = GenericRelation(
|
||||
FunPerson,
|
||||
content_type_field='favorite_thing_type',
|
||||
object_id_field='favorite_thing_id',
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue