From 1f9a4dc3ba44ce53cc1a3da7fa120d074fd97575 Mon Sep 17 00:00:00 2001 From: vlaube-de Date: Thu, 15 Sep 2011 23:26:55 +0300 Subject: [PATCH] Add Unicode Support to Initial Text tells python to handle the source file as utf-8 and use glyphs from http://copypastecharacter.com/ (TODO: check what happens on non osx systems) --- lightwrite/texts/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightwrite/texts/views.py b/lightwrite/texts/views.py index 0cdf514..fe9ed1b 100644 --- a/lightwrite/texts/views.py +++ b/lightwrite/texts/views.py @@ -1,3 +1,4 @@ +# encoding: utf-8 from django.http import HttpResponse, HttpResponseRedirect from django.template import Context, loader from django.core.urlresolvers import reverse @@ -47,8 +48,7 @@ def json_get_text(request, wash): t = Text.objects.filter(wash=wash) if (len(t)==0): t = Text(wash=wash) - # Display mac command as HTML entity - t.text = '\n\nWelcome to LightWrite!\nby Gun.io\n\nLightWrite is a web-based clone of WriteRoom - it\'s a place to write your thoughts without any distractions.\n\nTo use LightWrite, just start typing! You can move your mouse over the bottom of the page to save your text online or export to a file. \n\nTo enter fullscreen mode, just press F11, or ⌘F if you\'re using OSX.\n\nEnjoy!\n\nLove,\nTeam Gun.io' + t.text = '\n\nWelcome to LightWrite!\nby Gun.io\n\nLightWrite is a web-based clone of WriteRoom - it\'s a place to write your thoughts without any distractions.\n\nTo use LightWrite, just start typing! You can move your mouse over the bottom of the page to save your text online or export to a file. \n\nTo enter fullscreen mode, just press F11, or ⇧⌘F if you\'re using OSX.\n\nEnjoy!\n\nLove,\nTeam Gun.io' t.save() t = Text.objects.filter(wash=wash) data = serializers.serialize("json", t)