Commit 0f5c440a521962cb1e89f88cfa86dd2334ec99ac

Authored by ailsoncgt
1 parent d1d566d3

Null true in birth_date for user model #186

users/migrations/0005_auto_20161021_1131.py 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-10-21 14:31
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.db import migrations, models
  6 +
  7 +
  8 +class Migration(migrations.Migration):
  9 +
  10 + dependencies = [
  11 + ('users', '0004_auto_20161021_0820'),
  12 + ]
  13 +
  14 + operations = [
  15 + migrations.AlterField(
  16 + model_name='user',
  17 + name='birth_date',
  18 + field=models.DateField(null=True, verbose_name='Birth Date'),
  19 + ),
  20 + ]
... ...
users/models.py
... ... @@ -21,7 +21,7 @@ class User(AbstractBaseUser, PermissionsMixin):
21 21 state = models.CharField(_('State'), max_length = 30, blank = True)
22 22 gender = models.CharField(_('Gender'), max_length = 1, choices = (('M', _('Male')), ('F', _('Female'))))
23 23 image = models.ImageField(verbose_name = _('Image'), blank = True, upload_to = 'users/')
24   - birth_date = models.DateField(_('Birth Date'))
  24 + birth_date = models.DateField(_('Birth Date'), null=True)
25 25 phone = models.CharField(_('Phone'), max_length = 30, blank = True)
26 26 cpf = models.CharField(_('Cpf'), max_length = 15, blank = True)
27 27 type_profile = models.IntegerField(_('Type'), null = True, blank = True, choices = ((1, _('Professor')), (2, _('Student'))), default=2)
... ...