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!

Slider app for monocle project

Project Description
### *monocle_slider app*
### Модуль: monocle_slider
====================================================


## **Пример отображения на сайте:**
![Slider](/readme_images/slider.png)

## **Пример отображения в панели администрирования:**
![Slider](/readme_images/slider_admin.png)

## **Файл models.py:**

from django.db import models

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

from filebrowser.fields import FileBrowseField

class Slider(models.Model):
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='true', blank=False, verbose_name='Стрелки навигации')
pagination = models.CharField(max_length=5, choices=CHOICES_PAGIN, default='true', blank=False, verbose_name='Пагинация')

def __str__(self):
return self.name

class Meta:
verbose_name_plural = u'Слайдеры'
verbose_name = u'Слайдер'

class Slide(models.Model):
name = models.CharField(max_length=255, verbose_name='Название')
slider = models.ForeignKey('Slider', verbose_name= 'Слайдер')
image = FileBrowseField(max_length=200, directory="'slider", extensions=[".jpg", ".png", ".jpeg", ".ico", ], 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)

class Meta:
verbose_name_plural = u'Слайды'
verbose_name = u'Слайд'
ordering = ['position']

from django.apps import AppConfig
class CustomAppConfig(AppConfig):
name = 'apps.monocle_slider'
verbose_name = 'Слайдер'
Release History

Release History

This version
History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.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_slider-0.1.4-py3-none-any.whl (3.8 MB) Copy SHA256 Checksum SHA256 3.4 Wheel May 29, 2015
monocle_slider-0.1.4.tar.gz (370.8 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