Commit ed91048a authored by Ozzieisaacs's avatar Ozzieisaacs

Fix for magic link with python 3

parent e6ff2f1d
...@@ -124,7 +124,7 @@ See https://github.com/adobe-type-tools/cmap-resources ...@@ -124,7 +124,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<span data-l10n-id="print_label">Print</span> <span data-l10n-id="print_label">Print</span>
</button> </button>
<button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download"> <button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download" {% if not g.user.role_download() %} style="display:none;" {% endif %}>
<span data-l10n-id="download_label">Download</span> <span data-l10n-id="download_label">Download</span>
</button> </button>
...@@ -227,7 +227,7 @@ See https://github.com/adobe-type-tools/cmap-resources ...@@ -227,7 +227,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<span data-l10n-id="print_label">Print</span> <span data-l10n-id="print_label">Print</span>
</button> </button>
<button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download"> <button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download" {% if not g.user.role_download() %} style="display:none;" {% endif %}>
<span data-l10n-id="download_label">Download</span> <span data-l10n-id="download_label">Download</span>
</button> </button>
<a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark"> <a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<div class="well"> <div class="well">
<h2 style="margin-top: 0">{{_('Remote login')}}</h2> <h2 style="margin-top: 0">{{_('Remote login')}}</h2>
<p> <p>
{{_('Using your another device, visit')}} <a href="{{verify_url}}">{{verify_url}}</a> {{_('and log in')}}. {{_('Using your another device, login and visit ')}} <a href="{{verify_url}}">{{verify_url}}</a>.
</p> </p>
<p> <p>
{{_('Once you do so, you will automatically get logged in on this device.')}} {{_('Once you do so, you will automatically get logged in on this device.')}}
</p> </p>
<p> <p>
{{_('The link will expire after %s minutes.' % 10)}} {{_('The link will expire after 10 minutes.')}}
</p> </p>
</div> </div>
{% endblock %} {% endblock %}
......
This diff is collapsed.
...@@ -356,7 +356,7 @@ class RemoteAuthToken(Base): ...@@ -356,7 +356,7 @@ class RemoteAuthToken(Base):
expiration = Column(DateTime) expiration = Column(DateTime)
def __init__(self): def __init__(self):
self.auth_token = hexlify(os.urandom(4)) self.auth_token = (hexlify(os.urandom(4))).decode('utf-8')
self.expiration = datetime.datetime.now() + datetime.timedelta(minutes=10) # 10 min from now self.expiration = datetime.datetime.now() + datetime.timedelta(minutes=10) # 10 min from now
def __repr__(self): def __repr__(self):
......
This diff is collapsed.
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