diff --git a/settings.py b/settings.py index 35faf25..13da368 100644 --- a/settings.py +++ b/settings.py @@ -200,9 +200,6 @@ LOGIN_URL = '/login/' LOGOUT_URL = '/logout/' ACCOUNT_ACTIVATION_DAYS = 0 -# HTTPS -USE_HTTPS = False - # User absolute URLs ABSOLUTE_URL_OVERRIDES = { 'auth.user': lambda u: "/%s/" % u.username, diff --git a/snipts/models.py b/snipts/models.py index d03a846..bc4a57c 100644 --- a/snipts/models.py +++ b/snipts/models.py @@ -101,16 +101,11 @@ class Snipt(models.Model): if settings.DEBUG: root = 'http://snipt.localhost' else: - if settings.USE_HTTPS: - root = 'https://snipt.net' - else: - root = 'http://snipt.net' + root = 'https://snipt.net' return '{}/{}/{}/'.format(root, self.user.username, self.slug) def get_embed_url(self): - return 'http{}://{}/embed/{}/'.format('s' if settings.USE_HTTPS else '', - site.domain, - self.key) + return 'https://{}/embed/{}/'.format(site.domain, self.key) @property def sorted_tags(self): diff --git a/snipts/templates/snipts/embed.html b/snipts/templates/snipts/embed.html index 3570164..8105df4 100644 --- a/snipts/templates/snipts/embed.html +++ b/snipts/templates/snipts/embed.html @@ -1 +1 @@ -document.open();document.writeln('
');{% for line in lines %}document.writeln('{{ line|safe }}');{% endfor %}document.writeln('');document.writeln('
');document.close(); +document.open();document.writeln('
');{% for line in lines %}document.writeln('{{ line|safe }}');{% endfor %}document.writeln('');document.writeln('
');document.close(); diff --git a/snipts/templates/snipts/list-user.html b/snipts/templates/snipts/list-user.html index 2ba53ef..2b44664 100644 --- a/snipts/templates/snipts/list-user.html +++ b/snipts/templates/snipts/list-user.html @@ -14,7 +14,7 @@ {% block tags %}
- +
{{ user.username }} diff --git a/snipts/templates/snipts/snipt-js-template.html b/snipts/templates/snipts/snipt-js-template.html index d83cc58..1ceb43a 100644 --- a/snipts/templates/snipts/snipt-js-template.html +++ b/snipts/templates/snipts/snipt-js-template.html @@ -58,7 +58,7 @@