aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyaggr3g470r/templates/edit_feed.html6
-rw-r--r--pyaggr3g470r/views.py6
2 files changed, 8 insertions, 4 deletions
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 %} <span style="color: red;">{{ error }}<br /></span>{% 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/<feed_id>', methods=['GET'])
@login_required
bgstack15