I want the monkey to fix the user model from Django.
My code is:
from django.db import models
from django.contrib.auth.models import User
User.add_to_class('secret_question', models.CharField(max_length="100"))
User.add_to_class('answer', models.CharField(max_length="100"))
User.add_to_class('DOB', models.DateField())
Where to place this code so that it python manage.py syncdbcreates the correct table?
I tried the main directory models.py, I tried the application directory models.py(these two did not give the correct table), and I tried to put it in the settings.pyproject (error, can't run).
Derek source
share