Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Django application providing database, form fields and middleware for timezone support.

Project Description

Django application providing database, form fields and middleware for timezone support.


pip install django-sundial


TIME_ZONE = 'America/Chicago'
AUTH_USER_MODEL = 'app.User'
# app/
from django.conf import settings
from django.contrib.auth.models import AbstractUser
from django.contrib.auth.signals import user_logged_in
from django.dispatch.dispatcher import receiver

from sundial.fields import TimezoneField
from sundial.utils import set_session_timezone
from sundial.zones import COMMON_GROUPED_CHOICES

class User(AbstractUser):
    timezone = TimezoneField(
        default=settings.TIME_ZONE, choices=COMMON_GROUPED_CHOICES

def assign_user_timezone(request, user, **kwargs):
    set_session_timezone(request.session, user.timezone)
Release History

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_sundial-1.0.3-py2.py3-none-any.whl (8.2 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Sep 13, 2017
django-sundial-1.0.3.tar.gz (5.0 kB) Copy SHA256 Checksum SHA256 Source Sep 13, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting