mirror of
https://github.com/status-im/cabot.git
synced 2025-02-24 02:18:08 +00:00
Whitespace
This commit is contained in:
parent
5cceaa926a
commit
db554a5192
@ -27,7 +27,7 @@ class AlertPlugin(PolymorphicModel):
|
||||
def __unicode__(self):
|
||||
return u'%s' % (self.title)
|
||||
|
||||
def send_alert(service, users, duty_officers):
|
||||
def send_alert(self, service, users, duty_officers):
|
||||
"""
|
||||
Implement a send_alert function here that shall be called.
|
||||
"""
|
||||
@ -39,7 +39,7 @@ class AlertPluginUserData(PolymorphicModel):
|
||||
|
||||
class Meta:
|
||||
unique_together = ('title', 'user',)
|
||||
|
||||
|
||||
def __unicode__(self):
|
||||
return u'%s' % (self.title)
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import os
|
||||
import dj_database_url
|
||||
import re
|
||||
from django.conf import settings
|
||||
from cabot.celeryconfig import *
|
||||
from cabot.cabot_config import *
|
||||
@ -125,8 +126,13 @@ INSTALLED_APPS = (
|
||||
)
|
||||
|
||||
# Load additional apps from configuration file
|
||||
CABOT_PLUGINS_ENABLED_PARSED = []
|
||||
for plugin in CABOT_PLUGINS_ENABLED.split(","):
|
||||
INSTALLED_APPS += (plugin,)
|
||||
# Hack to clean up if versions of plugins specified
|
||||
exploded = re.split(r'[<>=]+', plugin)
|
||||
CABOT_PLUGINS_ENABLED_PARSED.append(exploded[0])
|
||||
|
||||
INSTALLED_APPS += tuple(CABOT_PLUGINS_ENABLED_PARSED)
|
||||
|
||||
COMPRESS_PRECOMPILERS = (
|
||||
('text/coffeescript', 'coffee --compile --stdio'),
|
||||
|
@ -24,6 +24,9 @@ from django.contrib.auth.views import login, logout, password_reset, password_re
|
||||
admin.autodiscover()
|
||||
|
||||
from importlib import import_module
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^$', view=RedirectView.as_view(url='services/', permanent=False),
|
||||
@ -143,11 +146,11 @@ def append_plugin_urls():
|
||||
Appends plugin specific URLs to the urlpatterns variable.
|
||||
"""
|
||||
global urlpatterns
|
||||
for plugin in settings.CABOT_PLUGINS_ENABLED.split(','):
|
||||
for plugin in settings.CABOT_PLUGINS_ENABLED_PARSED:
|
||||
try:
|
||||
_module = import_module('%s.urls' % plugin)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger.error('No url file available for plugin %s' % plugin)
|
||||
else:
|
||||
urlpatterns += patterns('',
|
||||
url(r'^plugins/%s/' % plugin, include('%s.urls' % plugin))
|
||||
|
Loading…
x
Reference in New Issue
Block a user