— Модуль: monocle_partners —
Модуль для отображения партнеров на странице сайта. Изначально логотипы черно-белые, а при наведении курсора мыши становятся цветными.
## Пример отображения на сайте: 
## Пример отображения в панели администрирования: 

## Файл models.py:
from django.db import models from easy_thumbnails.fields import ThumbnailerImageField
- class Partner(models.Model):
name = models.CharField(max_length=255, blank=False, verbose_name=’Название партнера’) url = models.CharField(max_length=255, blank=False, verbose_name=’Ссылка на сайт’) image = models.ImageField(upload_to=’partners/%Y/%m/%d’, verbose_name=’Логотип’) position = models.PositiveIntegerField(default=0, verbose_name=’Позиция’) isShown = models.BooleanField(default=True, verbose_name=’Показывать партнера’)
- def __str__(self):
return self.name
- def image_admin(self):
return u’<img src=”%s” height=”80” />’ % self.image.url
image_admin.short_description = u’Изображение’ image_admin.allow_tags = True
- class Meta:
verbose_name_plural = u’Партнеры’ verbose_name = u’Партнер’ ordering = [‘position’]
Metadata
Release files for monocle_partners 0.2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| monocle_partners-0.2.0.2.tar.gz | 226.0 kB | Without provenance | Details for monocle_partners-0.2.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| monocle_partners-0.2.0.2-py3-none-any.whl | Python 3 | none | any | Details for monocle_partners-0.2.0.2-py3-none-any.whl |
Total release size: 495.4 kB
Release files / monocle_partners-0.2.0.2.tar.gz
| Download URL | monocle_partners-0.2.0.2.tar.gz |
|---|---|
| Size | 226.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8852c8c8692f7e288c9761152440d7a889ccf9317bcad94618cdaf476062194d
|
|
BLAKE2b-256 checksum How to use checksums |
5a0dc58ad1eafbbeb97de49158c4389b60005bde6a0a565cd97ab6adf0f677bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / monocle_partners-0.2.0.2-py3-none-any.whl
| Download URL | monocle_partners-0.2.0.2-py3-none-any.whl |
|---|---|
| Size | 269.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c45ebd0a207c63ae961c158e620c79f931160676f8d41915b072f804f174b6ae
|
|
BLAKE2b-256 checksum How to use checksums |
33eb54e8d79a40307b98289bd4a57e3a2c44980bf2f8e8c9d5bcc599a3b68753
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for monocle_partners 0.2.0.2
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.