View admin.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from django.contrib import admin | |
class ReadonlyAdmin(admin.ModelAdmin): | |
""" | |
Example admin class which makes all fields readonly | |
""" | |
def __init__(self, model, admin_site): | |
super(ReadonlyAdmin, self).__init__(model, admin_site) |