Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Partners for monocle

Project Description

— Модуль: monocle_partners —

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

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

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

![Partners](/images_readme/partners_admin2.png)

## Файл 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’]
Release History

Release History

This version
History Node

0.2.0.2

History Node

0.2.0.1

History Node

0.2.0.0

History Node

0.1.9.0

History Node

0.1.8.1

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_partners-0.2.0.2-py3-none-any.whl (269.4 kB) Copy SHA256 Checksum SHA256 3.4 Wheel May 24, 2015
monocle_partners-0.2.0.2.tar.gz (226.0 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