diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-03-19 11:09:10 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-03-19 11:09:10 +0100 |
commit | eb4565bbab91e2942b19fb107b3d7c51d2c7afa9 (patch) | |
tree | bfa6fbf20d7c7b7b3eedebb79bae8ecd4e0759f1 /archaeological_context_records/ishtar_menu.py | |
parent | e2d6c50f231f636fed362be37e7bf3319fc5d6b8 (diff) | |
download | Ishtar-eb4565bbab91e2942b19fb107b3d7c51d2c7afa9.tar.bz2 Ishtar-eb4565bbab91e2942b19fb107b3d7c51d2c7afa9.zip |
Format - black: context_records
Diffstat (limited to 'archaeological_context_records/ishtar_menu.py')
-rw-r--r-- | archaeological_context_records/ishtar_menu.py | 64 |
1 files changed, 42 insertions, 22 deletions
diff --git a/archaeological_context_records/ishtar_menu.py b/archaeological_context_records/ishtar_menu.py index a7efd8da4..6d4ae1a57 100644 --- a/archaeological_context_records/ishtar_menu.py +++ b/archaeological_context_records/ishtar_menu.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2010-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> @@ -26,25 +26,45 @@ from . import models # be carreful: each access_controls must be relevant with check_rights in urls MENU_SECTIONS = [ - (40, SectionItem('record_management', _("Context record"), - profile_restriction='context_record', - css='menu-context-record', - childs=[MenuItem('record_search', _("Search"), - model=models.ContextRecord, - access_controls=['view_contextrecord', - 'view_own_contextrecord']), - MenuItem('record_creation', _("Creation"), - model=models.ContextRecord, - access_controls=['add_contextrecord', - 'add_own_contextrecord']), - MenuItem('record_modification', _("Modification"), - model=models.ContextRecord, - access_controls=['change_contextrecord', - 'change_own_contextrecord']), - MenuItem('record_deletion', _("Deletion"), - model=models.ContextRecord, - access_controls=['delete_contextrecord', - 'delete_own_contextrecord']), - ]) - ) + ( + 40, + SectionItem( + "record_management", + _("Context record"), + profile_restriction="context_record", + css="menu-context-record", + childs=[ + MenuItem( + "record_search", + _("Search"), + model=models.ContextRecord, + access_controls=["view_contextrecord", "view_own_contextrecord"], + ), + MenuItem( + "record_creation", + _("Creation"), + model=models.ContextRecord, + access_controls=["add_contextrecord", "add_own_contextrecord"], + ), + MenuItem( + "record_modification", + _("Modification"), + model=models.ContextRecord, + access_controls=[ + "change_contextrecord", + "change_own_contextrecord", + ], + ), + MenuItem( + "record_deletion", + _("Deletion"), + model=models.ContextRecord, + access_controls=[ + "delete_contextrecord", + "delete_own_contextrecord", + ], + ), + ], + ), + ) ] |