summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-03-29 17:17:02 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-03-29 17:17:02 +0200
commita05b5b86ee53497a88fe4cde8536380ed25c9e12 (patch)
tree5c533bbeb5c375d1baf86a57bbf71c8314a98e9b
parentbe76912dec8d7b49f601487b777129c32043117c (diff)
downloadIshtar-a05b5b86ee53497a88fe4cde8536380ed25c9e12.tar.bz2
Ishtar-a05b5b86ee53497a88fe4cde8536380ed25c9e12.zip
Admin: administrativ act readonlyfy
-rw-r--r--archaeological_operations/admin.py4
-rw-r--r--example_project/settings.py2
2 files changed, 6 insertions, 0 deletions
diff --git a/archaeological_operations/admin.py b/archaeological_operations/admin.py
index 34e6da2ca..9f886bc62 100644
--- a/archaeological_operations/admin.py
+++ b/archaeological_operations/admin.py
@@ -30,6 +30,10 @@ class AdministrativeActAdmin(HistorizedObjectAdmin):
'act_type')
list_filter = ('act_type',)
search_fields = ('year', 'index')
+ readonly_fields = ('in_charge', 'operator', 'scientist', 'signatory',
+ 'operation', 'associated_file', 'imports',
+ 'departments_label', 'towns_label',
+ 'history_modifier', 'history_creator')
model = models.AdministrativeAct
admin.site.register(models.AdministrativeAct, AdministrativeActAdmin)
diff --git a/example_project/settings.py b/example_project/settings.py
index 98eb14e9e..88738b479 100644
--- a/example_project/settings.py
+++ b/example_project/settings.py
@@ -237,6 +237,8 @@ JQUERY_UI_URL = STATIC_URL + "js/jquery-ui/"
if DEBUG_TOOLBAR:
+ if '..' not in sys.path:
+ sys.path.insert(0, '..')
global DEBUG_TOOLBAR_PANELS
global DEBUG_TOOLBAR_CONFIG
MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware']