From 6c93d208c8b550f73a616906f71e1092a04e889b Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sat, 12 Apr 2014 14:06:55 +0200 Subject: No SMTP for Heroku (for the moment). --- pyaggr3g470r/templates/edit_feed.html | 6 ++++-- pyaggr3g470r/views.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/templates/edit_feed.html b/pyaggr3g470r/templates/edit_feed.html index 48b7ecaf..09065d4c 100644 --- a/pyaggr3g470r/templates/edit_feed.html +++ b/pyaggr3g470r/templates/edit_feed.html @@ -15,8 +15,10 @@ {{ form.site_link.label }} {{ form.site_link(class_="form-control") }} {% for error in form.site_link.errors %} {{ error }}
{% endfor %} - {{ form.email_notification.label }} - {{ form.email_notification(class_="checkbox") }} + {% if not_on_heroku %} + {{ form.email_notification.label }} + {{ form.email_notification(class_="checkbox") }} + {% endif %} {{ form.enabled.label }} {{ form.enabled(class_="checkbox") }} diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index fdb8fbe5..dc8a2b12 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -504,10 +504,12 @@ def edit_feed(feed_id=None): if request.method == 'GET': if feed_id != None: form = AddFeedForm(obj=feed) - return render_template('edit_feed.html', action="Edit the feed", form=form, feed=feed) + return render_template('edit_feed.html', action="Edit the feed", form=form, feed=feed, \ + not_on_heroku = not conf.ON_HEROKU) # Return an empty form in order to create a new feed - return render_template('edit_feed.html', action="Add a feed", form=form) + return render_template('edit_feed.html', action="Add a feed", form=form, \ + not_on_heroku = not conf.ON_HEROKU) @app.route('/delete_feed/', methods=['GET']) @login_required -- cgit