This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| from django.db import models | |
| from disolution.models import * | |
| from django import forms | |
| class SalesForm(forms.Form): | |
| sales_id = forms.CharField(widget=forms.HiddenInput()) | |
| title = forms.CharField( | |
| label='Заголовок:', initial='', max_length=255, | |
| error_messages={'required': 'Обязательное поле','max_length':'Слишком длинный заголовок'}, |