Customers reviews app for monocle project
Project description
---
### Модуль: monocle_reviews
Модуль с отзывами клиентов.
---
## **Пример отображения на сайте:**
![Reviews](/images_readme/reviews.png)
## **Пример отображения в панели администрирования:**
![Reviews](/images_readme/reviews_admin.png)
## **Файл models.py:**
from django.db import models
from filebrowser.fields import FileBrowseField
class Review(models.Model):
reviewer = models.CharField(max_length=255, verbose_name='Имя клиента')
image = models.ImageField(upload_to='reviews/%Y/%m/%d', verbose_name='Фото клиента')
text = models.TextField(verbose_name='Текст отзыва')
isShown = models.BooleanField(default=True, verbose_name='Показывать отзыв')
position = models.PositiveIntegerField(default=0, verbose_name='Порядок')
def __str__(self):
return self.reviewer
class Meta:
verbose_name_plural = u'Отзывы'
verbose_name = u'Отзыв'
ordering = ['position']
from django.apps import AppConfig
class CustomAppConfig(AppConfig):
name = 'apps.monocle_reviews'
verbose_name = 'Отзывы клиентов'
### Модуль: monocle_reviews
Модуль с отзывами клиентов.
---
## **Пример отображения на сайте:**
![Reviews](/images_readme/reviews.png)
## **Пример отображения в панели администрирования:**
![Reviews](/images_readme/reviews_admin.png)
## **Файл models.py:**
from django.db import models
from filebrowser.fields import FileBrowseField
class Review(models.Model):
reviewer = models.CharField(max_length=255, verbose_name='Имя клиента')
image = models.ImageField(upload_to='reviews/%Y/%m/%d', verbose_name='Фото клиента')
text = models.TextField(verbose_name='Текст отзыва')
isShown = models.BooleanField(default=True, verbose_name='Показывать отзыв')
position = models.PositiveIntegerField(default=0, verbose_name='Порядок')
def __str__(self):
return self.reviewer
class Meta:
verbose_name_plural = u'Отзывы'
verbose_name = u'Отзыв'
ordering = ['position']
from django.apps import AppConfig
class CustomAppConfig(AppConfig):
name = 'apps.monocle_reviews'
verbose_name = 'Отзывы клиентов'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
monocle_reviews-0.3.0.2.tar.gz
(101.6 kB
view details)
Built Distribution
File details
Details for the file monocle_reviews-0.3.0.2.tar.gz
.
File metadata
- Download URL: monocle_reviews-0.3.0.2.tar.gz
- Upload date:
- Size: 101.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00677b09de00bd90e4900bd2fe55af2b66412263b34168146fcea5c9bb4d9448 |
|
MD5 | 4c7a40f0b7cce2bc067bde7297b0d0f2 |
|
BLAKE2b-256 | 9564c3f0a8a7808463082a18bd1144ef4d06cf5d4f2501cd96d4ad41e0eda064 |
File details
Details for the file monocle_reviews-0.3.0.2-py3-none-any.whl
.
File metadata
- Download URL: monocle_reviews-0.3.0.2-py3-none-any.whl
- Upload date:
- Size: 145.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb7412b7d6f4d184685494a15790125ad6b6d42f9b5c81e19e6f85f3147d28bf |
|
MD5 | 9ceca1f540e9e6d167fc2e5c1ec59ab9 |
|
BLAKE2b-256 | daac11e1bf4c2f85f3ac2e599e571753874413bfde2dd399bb3bdb13312400bb |