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_mainbanner

Модуль отображающий главный баннер сайта в виде карусели с изображениями

## **Пример отображения на сайте:**

## **Пример отображения в панели администрирования:**

## **Файл**

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

CHOICES_PAGIN = (('true', 'С пагинацией',), ('false', 'Без пагинации',))
CHOICES_ARROWS = (('true', 'Со стелками',), ('false', 'Без стелок',))

from filebrowser.fields import FileBrowseField

class MainBanner(SingletonModel):
name = models.CharField(max_length=255, verbose_name='Заголовок')
text = models.TextField(verbose_name='Подпись')
elem_number = models.PositiveSmallIntegerField(blank=False, default=1, verbose_name='Количество отображаемых слайдов')
isShown = models.BooleanField(default=True, verbose_name='Показывать')
arrows = models.CharField(max_length=5, choices=CHOICES_ARROWS, default='false', blank=False, verbose_name='Стрелки навигации')
pagination = models.CharField(max_length=5, choices=CHOICES_PAGIN, default='false', blank=False, verbose_name='Пагинация')

def __str__(self):

class Meta:
verbose_name_plural = u'Главный баннер'
verbose_name = u'Главный баннер'

class Slide(models.Model):
name = models.CharField(max_length=255, blank=True, verbose_name= 'Заголовок')
slider = models.ForeignKey('MainBanner', verbose_name= 'Баннер')
image = FileBrowseField(max_length=200, directory="'banner", extensions=[".jpg", ".png", ".jpeg"], blank=True, null=True, verbose_name= 'Изображение')
text = models.TextField(verbose_name='Подпись', blank=True)
isShown = models.BooleanField(default=True, verbose_name='Показывать')
position = models.PositiveSmallIntegerField(default=0)

def __str__(self):

class Meta:
verbose_name_plural = u'Слайды'
verbose_name = u'Слайд'
ordering = ['position']
from django.apps import AppConfig
class CustomAppConfig(AppConfig):
name = 'apps.monocle_mainbanner'
verbose_name = 'Главный баннер'
Release History

Release History

This version
History Node


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_mainbanner-0.1.5-py3-none-any.whl (4.7 MB) Copy SHA256 Checksum SHA256 3.4 Wheel May 29, 2015
monocle_mainbanner-0.1.5.tar.gz (304.7 kB) Copy SHA256 Checksum SHA256 Source May 29, 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