-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin_settings.py
29 lines (22 loc) · 1.11 KB
/
plugin_settings.py
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
PLUGIN_NAME = 'eprints'
DESCRIPTION = 'Imports Eprints articles.'
AUTHOR = 'Andy Byers'
VERSION = '1.1'
SHORT_NAME = 'eprints'
MANAGER_URL = 'eprints_index'
JANEWAY_VERSION = "1.3.6"
from utils import models
def install():
new_plugin, created = models.Plugin.objects.get_or_create(name=SHORT_NAME, version=VERSION, enabled=True)
if created:
print('Plugin {0} installed.'.format(PLUGIN_NAME))
else:
print('Plugin {0} is already installed.'.format(PLUGIN_NAME))
models.PluginSetting.objects.get_or_create(name='eprints_enabled', plugin=new_plugin, types='boolean',
pretty_name='Enable eprints', description='Enable eprints',
is_translatable=False)
def hook_registry():
# TODO: fill this in! you will need to declare a name for the hook, the module where to find the hook defined,
# and the function in the module. The function name will have to match the function in hooks.py
# ex: return {'article_footer_block': {'module': 'plugins.disqus.hooks', 'function': 'inject_disqus'}}
pass