私はジャンゴ1.7.11で働いています。私は既存のプロジェクトを持っており、私は管理パネル(私はスーパーユーザーを作成していない)を使ってみることに決めました。私は認証ページを開いたとき、私は見た:
は思考のテーブルに問題がある可能性があり、私はsqliteのデータベースと再実行、すべて削除することにしました:
$ python manage.py makemigrations app1
Migrations for 'app1':
0001_initial.py:
- Create model Seller
$ python manage.py migrate
Operations to perform:
Synchronize unmigrated apps: crispy_forms
Apply all migrations: admin, contenttypes, auth, app1, sessions
Synchronizing apps without migrations:
Creating tables...
Installing custom SQL...
Installing indexes...
Running migrations:
Applying app1.0001_initial... FAKED
$ python manage.py syncdb
Operations to perform:
Synchronize unmigrated apps: crispy_forms
Apply all migrations: admin, contenttypes, auth, app1, sessions
Synchronizing apps without migrations:
Creating tables...
Installing custom SQL...
Installing indexes...
Running migrations:
No migrations to apply.
You have installed Django's auth system, and don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Created:
Error: '' value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format.
Created:
私はこの問題を解決することができますどのように?
編集:
APP1/models.py:
from django.db import models
# from django.contrib.auth.models import AbstractUser
class Seller(models.Model):
# Address
contact_name = models.CharField(max_length=50)
contact_address = models.CharField(max_length=50)
contact_email = models.CharField(max_length=50)
contact_phone = models.CharField(max_length=50)
............
created = models.DateTimeField(auto_now_add=True,unique=True)
REQUIRED_FIELDS = ('contact_name','contact_email','contact_address','contact_phone')
USERNAME_FIELD = 'created'
あなたはmodels1をapp1に投稿できますか? AUTH_USER_MODELはあなたが投稿したスクリーンショットの実際のモデルを指していません。カスタムユーザーモデルを使用しようとしていますか? – nkhumphreys
上に追加... – user61629