aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-12 14:06:55 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-12 14:06:55 +0200
commit6c93d208c8b550f73a616906f71e1092a04e889b (patch)
tree2a8e3be071ae79ede53dccdbc204a1e861eecb5c
parentFor the moment disable full text search on Heroku. (diff)
downloadnewspipe-6c93d208c8b550f73a616906f71e1092a04e889b.tar.gz
newspipe-6c93d208c8b550f73a616906f71e1092a04e889b.tar.bz2
newspipe-6c93d208c8b550f73a616906f71e1092a04e889b.zip
No SMTP for Heroku (for the moment).
-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