src/cm/views/timezone.py
author Simon Descarpentries <sid@sopinspace.com>
Wed, 30 Oct 2013 18:08:42 +0100
changeset 556 69503659fe8f
parent 313 dcbb54cbfd06
permissions -rw-r--r--
[c_selection.js] If safari_mobile, get current selection from a previously created global variable [c_sync.js] ref where the safari_mobile global is used [c_text_view_comments.js] if safari_mobile update selection also on selectionChange event [text_view_comments.html] if safari_mobile store a clone of the current selection on each selectionChange set layout width to 99% to improve display factorize safari mobile detection code

from django import forms
from django.core.urlresolvers import reverse
from django.forms import ModelForm
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils.translation import ugettext as _, ugettext_lazy
from cm.models import Text, TextVersion, Attachment, Comment
from cm.cm_settings import DEFAULT_TIME_ZONE
import mimetypes
import simplejson
from cm.utils.timezone import tz_convert

def timezone_set(request):
    if request.method == 'POST':
        #if request.user.is_authenticated():
        try:
            tz = request.POST.get('tz', DEFAULT_TIME_ZONE)
            request.session['tz'] = tz
        except IOError:
            # silently swallow IOError
            pass
    
    return HttpResponse('')