Add formfield_overrides
This commit is contained in:
parent
c94fe44569
commit
1960abdbcb
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
from django.contrib import admin
|
||||
from django.utils.html import format_html
|
||||
from .models import *
|
||||
from django.forms import TextInput
|
||||
|
||||
|
||||
class PeopleResourceInline(admin.TabularInline):
|
||||
|
@ -72,6 +73,9 @@ class ResourceRangeInline(admin.TabularInline):
|
|||
|
||||
class ResourcePeopleInline(admin.TabularInline):
|
||||
model = PeopleResource
|
||||
formfield_overrides = {
|
||||
models.CharField: {'widget': TextInput(attrs={'size': '20'})}
|
||||
}
|
||||
|
||||
|
||||
class ResourceAdmin(admin.ModelAdmin):
|
||||
|
|
Loading…
Reference in a new issue