Commit 2e2602ff authored by Lukas Burgey's avatar Lukas Burgey

Add debug publishing flag

parent d84890f9
......@@ -8,7 +8,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEBUG = True
DEBUG_AUTH = False
DEBUG_CREDENTIALS = False
DEBUG_PUBLISHING = False
DEBUG_CREDENTIALS = True
ALLOWED_HOSTS = [
'hdf-portal-dev.data.kit.edu',
......
......@@ -166,7 +166,8 @@ class Deployment(PolymorphicModel):
self.publish()
def publish_to_client(self):
LOGGER.debug(self.msg('publish_to_client'))
if settings.DEBUG_PUBLISHING:
LOGGER.debug(self.msg('publish_to_client'))
from .serializers import clients
data = clients.DeploymentSerializer(self).data
......@@ -182,7 +183,8 @@ class Deployment(PolymorphicModel):
if self.user is None:
return
LOGGER.debug(self.msg('publish_to_user'))
if settings.DEBUG_PUBLISHING:
LOGGER.debug(self.msg('publish_to_user'))
from . import serializers
msg = dumps({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment