Skip to content

Instantly share code, notes, and snippets.



Created Jan 21, 2013
What would you like to do?
How to use Django's get_readonly_fields
def get_readonly_fields(self, request, obj=None):
if obj and obj.is_processed:
return ('csv_file',) + self.readonly_fields
return self.readonly_fields
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.