From 0e7bff35ec42fbcaf43f4c4f3512e3466297fe6b Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 26 Aug 2014 21:20:25 +0200 Subject: Changed a test of a environment variable. Updated README. --- README.rst | 7 ++++--- pyaggr3g470r/views.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index e3ddbe71..1beb338e 100644 --- a/README.rst +++ b/README.rst @@ -5,8 +5,8 @@ pyAggr3g470r Presentation ============ -`pyAggr3g470r `_ is a news aggregator with a web interface -based on `Flask `_. +`pyAggr3g470r `_ is a news aggregator with a web interface +based on `Flask `_. Features ======== @@ -38,7 +38,7 @@ After installation, you will be able to connect with the email *root@pyAggr3g470 Deploying the application on Heroku ''''''''''''''''''''''''''''''''''' -An instance of pyAggr3g470r is running `here `_. +An instance of pyAggr3g470r is running `here `_. .. code:: bash @@ -55,6 +55,7 @@ To enable account creation for users, you have to set some environment variables .. code:: bash + $ heroku config:set SELF_REGISTRATION=1 $ heroku config:set PLATFORM_URL= $ heroku config:set RECAPTCHA_PUBLIC_KEY= $ heroku config:set RECAPTCHA_PRIVATE_KEY= diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index 21490414..06459b4f 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -183,7 +183,7 @@ def signup(): """ Signup page. """ - if not os.environ.get("SELF_REGISTRATION", False): + if int(os.environ.get("SELF_REGISTRATION", 0)) =! 1: flash(gettext("Self-registration is disabled."), 'warning') return redirect(url_for('home')) if g.user is not None and g.user.is_authenticated(): -- cgit