Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

Moving to Py3 #38

Merged
merged 2 commits into from
Dec 29, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hgapp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# The imports in this file are order-sensitive

from __future__ import absolute_import


from flask import Flask
from flask_migrate import Migrate
Expand Down
10 changes: 5 additions & 5 deletions hgapp/views/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def login():
@app.route('/logout')
@lastuser.logout_handler
def logout():
flash(_(u"You are now logged out"), category='success')
flash(_("You are now logged out"), category='success')
return get_next_url()


Expand All @@ -41,13 +41,13 @@ def lastusernotify(user):
@lastuser.auth_error_handler
def lastuser_error(error, error_description=None, error_uri=None):
if error == 'access_denied':
flash(_(u"You denied the request to login"), category='error')
flash(_("You denied the request to login"), category='error')
return redirect(get_next_url())
return render_message(
title=_(u"Error: {error}").format(error=error),
title=_("Error: {error}").format(error=error),
message=Markup(
u"<p>{desc}</p><p>URI: {uri}</p>".format(
desc=escape(error_description or u''), uri=escape(error_uri or _(u'NA'))
"<p>{desc}</p><p>URI: {uri}</p>".format(
desc=escape(error_description or ''), uri=escape(error_uri or _('NA'))
)
),
)
2 changes: 1 addition & 1 deletion rqinit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

from urlparse import urlparse
from urllib.parse import urlparse

from hgapp import app

Expand Down