Admin: nedovol změnu pdf u KorekturovanéhoPDF
nevěděli bychom, kam přemístit korektury
This commit is contained in:
parent
70ddce6a8e
commit
eb19e57f8a
1 changed files with 7 additions and 0 deletions
|
@ -5,7 +5,14 @@ from korektury.models import KorekturovanePDF
|
||||||
|
|
||||||
# Register your models here.
|
# Register your models here.
|
||||||
class KorekturovanePDFAdmin(VersionAdmin):
|
class KorekturovanePDFAdmin(VersionAdmin):
|
||||||
|
|
||||||
readonly_fields = ['cas', 'stran']
|
readonly_fields = ['cas', 'stran']
|
||||||
|
|
||||||
|
def get_readonly_fields(self, request, obj=None):
|
||||||
|
if obj:
|
||||||
|
return self.readonly_fields + ['pdf']
|
||||||
|
return self.readonly_fields
|
||||||
|
|
||||||
fieldsets = [
|
fieldsets = [
|
||||||
(None,
|
(None,
|
||||||
{'fields':
|
{'fields':
|
||||||
|
|
Loading…
Reference in a new issue