Skip to main content

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

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

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

![Timer](/images_readme/timer_admin2.png)

## Файл models.py:

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.delta = (self.deadline - now)

#return rounded seconds return int(self.delta.total_seconds())

def __str__(self):

return u’Таймер’

class Meta:

verbose_name_plural = u’Таймер’ verbose_name = u’Таймер’

Metadata

Release files for monocle_timer 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for monocle_timer 0.2.3
File Size Uploaded Provenance Actions
monocle_timer-0.2.3.tar.gz 3.8 kB Without provenance Details for monocle_timer-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for monocle_timer 0.2.3
File Interpreter ABI Platform Actions
monocle_timer-0.2.3-py3-none-any.whl Python 3 none any Details for monocle_timer-0.2.3-py3-none-any.whl

Total release size: 11.0 kB

Release files / monocle_timer-0.2.3.tar.gz

Download URL monocle_timer-0.2.3.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3f009fa700894ed391219e3ced05069d54e703c592b6b210cbfd5ce2812ba09d
BLAKE2b-256 checksum
How to use checksums
2e93f85d48c4a3dc28964595bfef8b7deeb5737e7ec579e642ce7e65d6ae3dca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / monocle_timer-0.2.3-py3-none-any.whl

Download URL monocle_timer-0.2.3-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7c411e291feec05bfdb5d5b6551682acf247b198487bd7a6d1b0152573884c0
BLAKE2b-256 checksum
How to use checksums
95e3b4dafe60ebf78dcb575759e2849bb83293925a46c24eb4e4d191c11f2ff8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for monocle_timer 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page