Make phone and email optional in Contacts

This commit is contained in:
Oleg Lavrovsky 2018-06-28 16:12:03 +02:00
parent def464d812
commit c1953e15f5
2 changed files with 27 additions and 2 deletions

View file

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-28 14:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0024_socialcontact_home_site'),
]
operations = [
migrations.AlterField(
model_name='contact',
name='email',
field=models.EmailField(blank=True, default='', max_length=100),
),
migrations.AlterField(
model_name='contact',
name='phone',
field=models.CharField(blank=True, default='', max_length=40),
),
]

View file

@ -61,8 +61,8 @@ class Contact(models.Model):
'title_en',
)
address = models.TextField(default="", blank=True)
phone = models.CharField(max_length=40, default="")
email = models.EmailField(max_length=100, default="")
phone = models.CharField(max_length=40, blank=True, default="")
email = models.EmailField(max_length=100, blank=True, default="")
www = models.URLField(null=True, blank=True)
map_url = models.URLField(null=True, blank=True,