I'm working on an app in which I've made my customized 'User'
model which takes email as user name and it is dependent on another model called 'Company'
. When running command 'python manage.py createsuperuser'
I need that django asks me for company first and create company instance, than asks for User model fields in which 'company'
is a foreign key and then user provides company id possibly '1'
which the user already created when making company object.
I'm trying to implement above by creating management folder in my app, but it doesn't seems to work.
Can anybody please tell me the correct approach to do it.
Thanks in Advance.