diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-08-26 21:20:25 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2014-08-26 21:20:25 +0200 |
commit | 0e7bff35ec42fbcaf43f4c4f3512e3466297fe6b (patch) | |
tree | 19624f1adf1ec3f745adb1e9c0c1ad7f8755aa54 | |
parent | Minor typo.. (diff) | |
download | newspipe-0e7bff35ec42fbcaf43f4c4f3512e3466297fe6b.tar.gz newspipe-0e7bff35ec42fbcaf43f4c4f3512e3466297fe6b.tar.bz2 newspipe-0e7bff35ec42fbcaf43f4c4f3512e3466297fe6b.zip |
Changed a test of a environment variable. Updated README.
-rw-r--r-- | README.rst | 7 | ||||
-rw-r--r-- | pyaggr3g470r/views.py | 2 |
2 files changed, 5 insertions, 4 deletions
@@ -5,8 +5,8 @@ pyAggr3g470r Presentation ============ -`pyAggr3g470r <https://bitbucket.org/cedricbonhomme/pyaggr3g470r/>`_ is a news aggregator with a web interface -based on `Flask <http://flask.pocoo.org/>`_. +`pyAggr3g470r <https://bitbucket.org/cedricbonhomme/pyaggr3g470r>`_ is a news aggregator with a web interface +based on `Flask <http://flask.pocoo.org>`_. 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 <https://pyaggr3g470r.herokuapp.com/>`_. +An instance of pyAggr3g470r is running `here <https://pyaggr3g470r.herokuapp.com>`_. .. 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=<URL-of-your-platform> $ heroku config:set RECAPTCHA_PUBLIC_KEY=<your-recaptcha-public-key> $ heroku config:set RECAPTCHA_PRIVATE_KEY=<your-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(): |