1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #14797 -- Corrected the handling of get_form_class() when a custom queryset has been defined, but a model hasn't. Thanks to Gabriel Grant for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2010-12-04 11:20:52 +00:00
parent 324658ef26
commit adfd7f8172
4 changed files with 10 additions and 5 deletions

View File

@@ -7,6 +7,10 @@ from django.utils.unittest import expectedFailure
from regressiontests.generic_views.models import Artist, Author
from regressiontests.generic_views import views
class ModelFormMixinTests(TestCase):
def test_get_form(self):
form_class = views.AuthorGetQuerySetFormView().get_form_class()
self.assertEqual(form_class.Meta.model, Author)
class CreateViewTests(TestCase):
urls = 'regressiontests.generic_views.urls'