Example #1
0
 def is_secure(self):
     # the protocol doesn't get set to https correctly in dev and
     # staging, so hack the query string to fake ssl for now.
     if Deployment.is_prod():
         return self.protocol == PROTOCOL.HTTPS
     else:
         return self.has_query_argument(PROTOCOL.HTTPS)
Example #2
0
 def is_secure(self):
     # the protocol doesn't get set to https correctly in dev and
     # staging, so hack the query string to fake ssl for now.
     if Deployment.is_prod():
         return self.protocol == PROTOCOL.HTTPS
     else:
         return self.has_query_argument(PROTOCOL.HTTPS)
Example #3
0
def _get_default_subject_prefix():
    prefix = ""
    if Deployment.is_prod():
        prefix = "PROD: "
    elif Deployment.is_staging():
        prefix = "STAGING: "
    elif Deployment.is_dev():
        prefix = "DEV: "

    return unicode(prefix)
Example #4
0
def _get_default_sender_name():
    name = ""

    if Deployment.is_prod():
        name = "Jackalope"
    elif Deployment.is_staging():
        name = "Jackalope Staging"
    elif Deployment.is_dev():
        name = "Jackalope Dev"

    return unicode(name)
Example #5
0
    def __init__(self, path="", query=""):
        super(SecureEmbeddableURL, self).__init__(path, query)

        # we only own ssl certs for secure.sendjack.com. for now.
        self.set_host(settings.SSL_DOMAIN)

        # the protocol doesn't get set to https correctly in dev and
        # staging, so hack the query string to fake ssl for now.
        if Deployment.is_prod():
            self.set_protocol(PROTOCOL.HTTPS)
        else:
            self.add_query_argument(PROTOCOL.HTTPS)
Example #6
0
    def __init__(self, path="", query=""):
        super(SecureEmbeddableURL, self).__init__(path, query)

        # we only own ssl certs for secure.sendjack.com. for now.
        self.set_host(settings.SSL_DOMAIN)

        # the protocol doesn't get set to https correctly in dev and
        # staging, so hack the query string to fake ssl for now.
        if Deployment.is_prod():
            self.set_protocol(PROTOCOL.HTTPS)
        else:
            self.add_query_argument(PROTOCOL.HTTPS)