diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-03-10 15:58:33 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-03-10 15:58:33 +0100 |
commit | e1d168f92cca540da0632af1e90e9cfc3625fb11 (patch) | |
tree | e99d6daaa344dac1c58555fe5f89baec65954a4c /source/pyAggr3g470r.py | |
parent | Improved HTML output of the export.. (diff) | |
download | newspipe-e1d168f92cca540da0632af1e90e9cfc3625fb11.tar.gz newspipe-e1d168f92cca540da0632af1e90e9cfc3625fb11.tar.bz2 newspipe-e1d168f92cca540da0632af1e90e9cfc3625fb11.zip |
It is now possible to change the URL of a site/blog.
Diffstat (limited to 'source/pyAggr3g470r.py')
-rwxr-xr-x | source/pyAggr3g470r.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index abfdaa2a..71aa3243 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -514,6 +514,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 = "<p>The URL of the site has been changed.</p>" + except: + tmpl = lookup.get_template("error.html") + message = "<p>Error when changing the URL of the site.</p>" + 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): """ Enables to change the URL of a feed already present in the database. |