{"id":168,"date":"2014-02-25T00:52:39","date_gmt":"2014-02-25T00:52:39","guid":{"rendered":"http:\/\/www.micha.name\/blog\/?p=168"},"modified":"2014-02-25T01:00:27","modified_gmt":"2014-02-25T01:00:27","slug":"tomdroid-snowy","status":"publish","type":"post","link":"https:\/\/www.micha.name\/blog\/2014\/02\/25\/tomdroid-snowy\/","title":{"rendered":"Tomdroid + Snowy"},"content":{"rendered":"<p>I finally found the solution to my problem of not being able to synchronise <a href=\"https:\/\/launchpad.net\/tomdroid\">Tomdroid<\/a> (A Tomboy compatible note-taking app for Android) with my <a href=\"https:\/\/wiki.gnome.org\/action\/show\/Projects\/Snowy\">Snowy<\/a> (a Tomboy synchronisation server) install.<\/p>\n<p>The answer is that django no longer allows any URL scheme, and restricts itself to http, https, and ftp.\u00a0 Tomdroid registers its own URL callback on the &#8220;tomdroid&#8221; scheme.\u00a0 Hence a patch is required to add the missing scheme:<\/p>\n<pre>File: \/usr\/lib\/python2.7\/dist-packages\/django\/http\/__init__.py<\/pre>\n<pre lang=\"diff\">\r\n--- __init__.py.orig \u00a0\u00a0\u00a0\u00a0\u00a0 2014-02-25 00:42:02.356288330 +0000\r\n+++ __init__.py 2014-02-25 00:32:01.994503437 +0000\r\n@@ -740,7 +740,7 @@\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return sum([len(str(chunk)) for chunk in self._container])\r\n\r\n\u00a0class HttpResponseRedirectBase(HttpResponse):\r\n-\u00a0\u00a0\u00a0 allowed_schemes = ['http', 'https', 'ftp']\r\n+\u00a0\u00a0\u00a0 allowed_schemes = ['http', 'https', 'ftp', 'tomdroid']\r\n\r\n\u00a0\u00a0\u00a0\u00a0 def __init__(self, redirect_to):\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 super(HttpResponseRedirectBase, self).__init__()\r\n<\/pre>\n<p>After patching, remember to restart Apache.<\/p>\n<p>Many thanks to the fix from <a href=\"http:\/\/www.circuitdb.com\/?p=756\">this blog entry<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fixing synchronisation between Tomdroid and Snowy.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[18,30],"_links":{"self":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts\/168"}],"collection":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/comments?post=168"}],"version-history":[{"count":4,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts\/168\/revisions"}],"predecessor-version":[{"id":170,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/posts\/168\/revisions\/170"}],"wp:attachment":[{"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/media?parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/categories?post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.micha.name\/blog\/wp-json\/wp\/v2\/tags?post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}