This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
======================
Django-temporal-models
======================

Django-temporal-models это темпоральные модели навеянные 1совскими регистрами сведений.

Небольшой пример
==============
>>> from temporal.models import models, TemporalForeignKey, TemporalModel, TemporalTrail
>>>
>>> class Person(TemporalModel):
>>> first_name = models.CharField(max_length=255)
>>> last_name = models.CharField(max_length=255)
>>> salary = models.PositiveIntegerField()
>>> organization = TemporalForeignKey('Organization')
>>>
>>> history = TemporalTrail()
>>>
>>> def __str__(self):
>>> return u"%s %s" % (self.first_name, self.last_name)
>>>
>>> class Organization(TemporalModel):
>>> name = models.CharField(max_length=255)
>>>
>>> history = TemporalTrail()
>>>
>>> def __str__(self):
>>> return u"%s" % (self.name)
>>>
>>> from datetime import date
>>>
>>> org = Organization.objects.create(name=u'Муниципальное унитарное предприятие городского транспорта "Тюменьгортранс"', date_begin=date(1997, 01, 31))
>>>
>>> org.name = u'Муниципальное учреждение пассажирского городского транспорта "Тюменьгортранс"'
>>> org.date_begin = date(2004,7,1)
>>> org.save()
>>>
>>> org.name = u'Муниципальное казенное учреждение "Тюменьгортранс"'
>>> org.date_begin = date(2012,1,11)
>>> org.save()
>>>
>>> org.get_actual(date(2010,1,1))
<organizationtemporal: Муниципальное="" учреждение="" пассажирского="" городского="" транспорта="" "Тюменьгортранс"="" as="" of="" 2004-07-01..2012-01-10="">
>>>
>>> person = Person.objects.create(first_name=u'Василий', last_name=u'Пупкин', salary=7000, organization=org, date_begin=date(2000,5,10))
>>>
>>> person.date_begin=date(2005,1,1)
>>> person.salary=12000
>>> person.save()
>>>
>>> person.date_begin=date(2010,1,1)
>>> person.salary=17000
>>> person.save()
>>>
>>> person.date_begin=date(2012,2,1)
>>> person.salary=20000
>>> person.save()
>>>
>>> person.get_actual()
<persontemporal: Василий="" Пупкин="" as="" of="" 2012-02-01..="">
>>>
>>> person.get_actual().organization
<organizationtemporal: Муниципальное="" казенное="" учреждение="" "Тюменьгортранс"="" as="" of="" 2012-01-11..="">
>>>
>>> person.get_actual(date(2011,10,1))
<persontemporal: Василий="" Пупкин="" as="" of="" 2010-01-01..2012-01-31="">
>>>
>>> person.get_actual(date(2011,10,1)).organization
<organizationtemporal: Муниципальное="" учреждение="" пассажирского="" городского="" транспорта="" "Тюменьгортранс"="" as="" of="" 2004-07-01..2012-01-10="">
Release History

Release History

0.0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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