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

Commit

Permalink
Moving to Py3 (#38)
Browse files Browse the repository at this point in the history
* 2to3 changes

* updated readme to mention py3
  • Loading branch information
iambibhas authored Dec 29, 2019
1 parent bb3b6ed commit 0eb489f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ HasGeek App Boilerplate

[![Build status](https://secure.travis-ci.org/hasgeek/hgapp.svg)](https://travis-ci.org/hasgeek/hgapp) [![Coverage Status](https://coveralls.io/repos/hasgeek/hgapp/badge.svg)](https://coveralls.io/r/hasgeek/hgapp)

Base template for an app that uses Lastuser, Baseframe and Coaster with Flask and SQLAlchemy.
Base template for an app that uses Lastuser, Baseframe and Coaster with Flask and SQLAlchemy. Supports Python 3+ only.

Setup
-----

1. Clone this repository into your development environment.
2. Create a Python virtualenv and activate it.
2. Create a Python 3 virtualenv and activate it.
3. Install requirements:
* `pip install -r requirements.txt`
* `pip install -r test_requirements.txt`
Expand Down
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

0 comments on commit 0eb489f

Please sign in to comment.