Django error creating admin user django.core.exceptions.ValidationError?
the following error occurs after executing python manage.py createsuperuser and entering the corresponding user name and password, etc.
django.core.exceptions.ValidationError: ["must be a valid date and time format, please use the YYYY-MM-DD HH:MM [: ss [.uuuuuuu]] [TZ] format.]
before creating a superuser, a models module is written, and many time-related fields are involved. I wonder if there will be any contact
Please advise
models.py
from datetime import datetime
from django.db import models
from django.contrib.auth.models import AbstractUser
Create your models here.
class UserProfile(AbstractUser):-sharp
nick_name = models.CharField(max_length=30, verbose_name=u"", default=u"")
birthday = models.DateTimeField(verbose_name=u"",null=True,blank=True,default=u"")
gender = models.CharField(choices=(("male",u""),("femal",u"")),default=u"",max_length=5)
address = models.CharField(max_length=100,default=u"")
mobile = models.CharField(max_length=11,blank=True,null=True)
image = models.ImageField(upload_to="image/%Y/%m",default=u"image/default.img",max_length=100)-sharp
class Meta:
verbose_name = u""
verbose_name_plural = verbose_name
def __str__(self):-sharpadmin
return self.username