2010-06-25 39 views

回答

2

這裏是你提到的帖子,與需要改變的例子使字段只讀:

from django.contrib.admin.models import LogEntry 

class LogEntryAdmin(admin.ModelAdmin): 
    readonly_fields = ('content_type', 'user', 'action_time') 

admin.site.register(LogEntry, LogEntryAdmin) 

這隻有在Django 1.2所以有可能你需要升級你的Django包。