mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #22979 -- Moved bug* tests
This commit is contained in:
parent
f14898a453
commit
11181a64f9
10 changed files with 49 additions and 79 deletions
|
@ -407,3 +407,19 @@ class StumpJoke(models.Model):
|
|||
class Student(models.Model):
|
||||
character = models.ForeignKey(Character)
|
||||
study = models.CharField(max_length=30)
|
||||
|
||||
|
||||
# Model for #639
|
||||
class Photo(models.Model):
|
||||
title = models.CharField(max_length=30)
|
||||
image = models.FileField(storage=temp_storage, upload_to='tests')
|
||||
|
||||
# Support code for the tests; this keeps track of how many times save()
|
||||
# gets called on each instance.
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(Photo, self).__init__(*args, **kwargs)
|
||||
self._savecount = 0
|
||||
|
||||
def save(self, force_insert=False, force_update=False):
|
||||
super(Photo, self).save(force_insert, force_update)
|
||||
self._savecount += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue