-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin_settings.py
More file actions
63 lines (51 loc) · 1.49 KB
/
plugin_settings.py
File metadata and controls
63 lines (51 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import os
from django.conf import settings
from utils import plugins, setting_handler
PLUGIN_NAME = 'Custom Styling Plugin'
DISPLAY_NAME = 'Custom Styling'
DESCRIPTION = 'Allows staff to add custom css to journals.'
AUTHOR = 'Andy Byers'
VERSION = '1.1.1'
SHORT_NAME = 'customstyling'
MANAGER_URL = 'customstyling_manager'
JANEWAY_VERSION = "1.7.0"
BASE_CSS_PATH = os.path.join(
settings.MEDIA_ROOT,
'customstyling',
)
CSS_MEDIA_PATH = os.path.join(
settings.MEDIA_URL,
'customstyling',
)
class CustomstylingPlugin(plugins.Plugin):
plugin_name = PLUGIN_NAME
display_name = DISPLAY_NAME
description = DESCRIPTION
author = AUTHOR
short_name = SHORT_NAME
manager_url = MANAGER_URL
version = VERSION
janeway_version = JANEWAY_VERSION
press_wide = True
plugin_group_name = 'plugin:{plugin_name}'.format(plugin_name=SHORT_NAME)
def install():
CustomstylingPlugin.install()
setting_handler.create_setting(
setting_group_name=CustomstylingPlugin.plugin_group_name,
setting_name='enable_editor_access',
pretty_name='Enable Editor Access',
type='boolean',
description='If enabled, editors can access the css plugin.',
is_translatable=False,
default_value=' ',
)
def hook_registry():
return {
'base_head_css':
{
'module': 'plugins.customstyling.hooks',
'function': 'inject_css',
},
}
def register_for_events():
pass