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!

Sample app for django-monocle project generated by scaffolder

Project Description

— ### Модуль: monocle_timer —

## Пример отображения на сайте: ![Timer](/images_readme/timer.png)

## Пример отображения в панели администрирования: ![Timer](/images_readme/timer_admin1.png)


## Файл

from django.db import models from solo.models import SingletonModel

import datetime from django.utils.timezone import utc

class Timer(SingletonModel):

text = models.TextField(verbose_name=u’Текст акции’, help_text=u’Не более 200 символов’, blank=False) deadline = models.DateTimeField(verbose_name=u’Срок окончания акции’, blank=False) isShown = models.BooleanField(default=True,help_text= u’Отображать таймер на сайте’, verbose_name=u’Показывать’)

def get_countdown(self):

#get current time now = datetime.datetime.utcnow().replace(tzinfo=utc)

#calculate time difference = (self.deadline - now)

#return rounded seconds return int(

def __str__(self):
return u’Таймер’
class Meta:
verbose_name_plural = u’Таймер’ verbose_name = u’Таймер’
Release History

Release History

This version
History Node


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
monocle_timer-0.2.3-py3-none-any.whl (7.2 kB) Copy SHA256 Checksum SHA256 3.4 Wheel May 24, 2015
monocle_timer-0.2.3.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source May 24, 2015

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