semvec/pypi-packages huggingface dataset:
django-sundial 1.1.1
Django application providing database, form fields and middleware for timezone support.
License: MIT
Keywords: django timezone

django-sundial
==============

.. image:: https://img.shields.io/pypi/l/django-sundial.svg?style=flat
    :target: https://pypi.python.org/pypi/django-sundial/
    :alt: License

.. image:: https://img.shields.io/pypi/v/django-sundial.svg?style=flat
    :target: https://pypi.python.org/pypi/django-sundial/
    :alt: Latest Version

.. image:: https://travis-ci.org/charettes/django-sundial.svg?branch=master
    :target: https://travis-ci.org/charettes/django-sundial
    :alt: Build Status

.. image:: https://coveralls.io/repos/charettes/django-sundial/badge.svg?branch=master
    :target: https://coveralls.io/r/charettes/django-sundial?branch=master
    :alt: Coverage Status

.. image:: https://img.shields.io/pypi/pyversions/django-sundial.svg?style=flat
    :target: https://pypi.python.org/pypi/django-sundial/
    :alt: Supported Python Versions

.. image:: https://img.shields.io/pypi/wheel/django-sundial.svg?style=flat
    :target: https://pypi.python.org/pypi/django-sundial/
    :alt: Wheel Status

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

Installation
------------

.. code:: sh

    pip install django-sundial

Usage
-----

.. code:: python

    # settings.py
    TIME_ZONE = 'America/Chicago'
    AUTH_USER_MODEL = 'app.User'
    MIDDLEWARE = [
        ...,
        'django.contrib.sessions.middleware.SessionMiddleware',
        ...,
        'sundial.middleware.TimezoneMiddleware',
        ...,
    ]

.. code:: python

    # app/models.py
    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
        )

    @receiver(user_logged_in)
    def assign_user_timezone(request, user, **kwargs):
        set_session_timezone(request.session, user.timezone)
abconfig 1.0.12
Simple and powerful configuration manager for Python projects
License: MIT
Requires Python: >=3.6.0

# ABConfig

[![Build Status](https://travis-ci.org/kudato/abconfig.svg?branch=master)](https://travis-ci.org/kudato/abconfig) [![Coverage Status](https://coveralls.io/repos/github/kudato/abconfig/badge.svg?branch=master)](https://coveralls.io/github/kudato/abconfig?branch=master)

The configuration should be simple, this project aims to give you all the power while maintaining ease of use.


## Features

- Json or Yaml files and environment variables are supported as source;

- Correct data types (even for environment variables);

- Create configurations in django models style;

- The result object is a regular dictionary;


## Read the docs

**Documentation**: http://abconfig.readthedocs.io/

> Also strongly recommend that you read ["The twelve-factor app" for config](https://12factor.net/ru/config) before starting.