From e1d168f92cca540da0632af1e90e9cfc3625fb11 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 10 Mar 2013 15:58:33 +0100 Subject: It is now possible to change the URL of a site/blog. --- source/pyAggr3g470r.py | 17 +++++++++++++++++ source/templates/feed.html | 6 ++++++ 2 files changed, 23 insertions(+) (limited to 'source') diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index abfdaa2a..71aa3243 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -513,6 +513,23 @@ class pyAggr3g470r(object): remove_feed.exposed = True + @auth.require() + def change_site_url(self, feed_id, old_site_url, new_site_url): + """ + Enables to change the URL of a site present in the database. + """ + try: + self.mongo.update_feed(feed_id, {"site_link":new_site_url}) + tmpl = lookup.get_template("confirmation.html") + message = "

The URL of the site has been changed.

" + except: + tmpl = lookup.get_template("error.html") + message = "

Error when changing the URL of the site.

" + finally: + return tmpl.render(message=message) + + change_site_url.exposed = True + @auth.require() def change_feed_url(self, feed_id, old_feed_url, new_feed_url): """ diff --git a/source/templates/feed.html b/source/templates/feed.html index 66d344db..f4a35e77 100644 --- a/source/templates/feed.html +++ b/source/templates/feed.html @@ -109,6 +109,12 @@ import utils +
+ + + +
+
-- cgit