mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Ensure that NullBooleanField displays the appropriate icon for null values in admin changelists. Refs #13071.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -464,11 +464,13 @@ class Post(models.Model):
|
||||
title = models.CharField(max_length=100)
|
||||
content = models.TextField()
|
||||
posted = models.DateField(default=datetime.date.today)
|
||||
public = models.NullBooleanField()
|
||||
|
||||
def awesomeness_level(self):
|
||||
return "Very awesome."
|
||||
|
||||
class PostAdmin(admin.ModelAdmin):
|
||||
list_display = ['title', 'public']
|
||||
readonly_fields = ('posted', 'awesomeness_level', 'coolness', lambda obj: "foo")
|
||||
|
||||
inlines = [
|
||||
|
||||
Reference in New Issue
Block a user