mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #10622 -- Resolved an issue with model inheritence and list_editable. Thanks oyvind and Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# coding: utf-8
|
||||
|
||||
import re
|
||||
import datetime
|
||||
|
||||
from django.test import TestCase
|
||||
from django.contrib.auth.models import User, Permission
|
||||
@@ -12,7 +13,7 @@ from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
|
||||
from django.utils.html import escape
|
||||
|
||||
# local test models
|
||||
from models import Article, CustomArticle, Section, ModelWithStringPrimaryKey, Person, Persona, FooAccount, BarAccount, Subscriber, ExternalSubscriber
|
||||
from models import Article, CustomArticle, Section, ModelWithStringPrimaryKey, Person, Persona, FooAccount, BarAccount, Subscriber, ExternalSubscriber, Podcast
|
||||
|
||||
try:
|
||||
set
|
||||
@@ -740,6 +741,12 @@ class AdminViewListEditable(TestCase):
|
||||
def tearDown(self):
|
||||
self.client.logout()
|
||||
|
||||
def test_inheritance(self):
|
||||
Podcast.objects.create(name="This Week in Django",
|
||||
release_date=datetime.date.today())
|
||||
response = self.client.get('/test_admin/admin/admin_views/podcast/')
|
||||
self.failUnlessEqual(response.status_code, 200)
|
||||
|
||||
def test_changelist_input_html(self):
|
||||
response = self.client.get('/test_admin/admin/admin_views/person/')
|
||||
# 2 inputs per object(the field and the hidden id field) = 6
|
||||
|
||||
Reference in New Issue
Block a user