aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-07-07 10:37:06 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-07-07 10:37:25 +0200
commit58074ae62d1f8423895e8ad28bd11371627be022 (patch)
treec1829f3c581c8431b8ae477f5ae11b0b91af7a2f
parentMerge branch 'master' of bitbucket.org:cedricbonhomme/pyaggr3g470r (diff)
downloadnewspipe-58074ae62d1f8423895e8ad28bd11371627be022.tar.gz
newspipe-58074ae62d1f8423895e8ad28bd11371627be022.tar.bz2
newspipe-58074ae62d1f8423895e8ad28bd11371627be022.zip
using bookmarklet for adding feed from navbar
-rw-r--r--pyaggr3g470r/templates/layout.html18
-rw-r--r--pyaggr3g470r/views/views.py11
2 files changed, 2 insertions, 27 deletions
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html
index fcdbee32..b37fb3e1 100644
--- a/pyaggr3g470r/templates/layout.html
+++ b/pyaggr3g470r/templates/layout.html
@@ -45,22 +45,8 @@
</a>
<ul class="dropdown-menu">
<li>
- <form action="/feed/create" class="navbar-form" method="POST" name="save">
- {{ create_feed_form.hidden_tag() }}
-
- {{ create_feed_form.link.label }}
- {{ create_feed_form.link(class_="form-control") }} {% for error in create_feed_form.link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
-
- {{ create_feed_form.title.label }}
- {{ create_feed_form.title(class_="form-control", placeholder=_('Optional')) }} {% for error in create_feed_form.title.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
-
- {{ create_feed_form.site_link.label }}
- {{ create_feed_form.site_link(class_="form-control", placeholder=_('Optional')) }} {% for error in create_feed_form.site_link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
-
- {{ create_feed_form.enabled.label }}
- {{ create_feed_form.enabled(class_="checkbox") }}
- <br />
- {{ create_feed_form.submit(class_="btn btn-default") }}
+ <form action="{{ url_for('feed.bookmarklet') }}" class="navbar-form" method="GET" name="save">
+ <input class="form-control" name="url" type="text" placeholder="{{_("site or feed url")}}" /> <input type="submit" value="+" class="btn btn-default" />
</form>
</li>
</ul>
diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py
index a4e799cc..189fd53f 100644
--- a/pyaggr3g470r/views/views.py
+++ b/pyaggr3g470r/views/views.py
@@ -137,17 +137,6 @@ def get_timezone():
except:
return conf.TIME_ZONE["en"]
-
-@app.context_processor
-def inject_feed_form():
- """
- Injects the 'AddFeedForm' objects in all templates.
-
- Context processors run before the template is rendered and have the
- ability to inject new values into the template context.
- """
- return dict(create_feed_form=AddFeedForm())
-
#
# Views.
#
bgstack15