Reputation: 5
when press ctrl+alt+r ("Enter Manage.py task name") and enter to createsuperuser, it ask me for-email, password and username. and when I enter it print-"Traceback (most recent call last): File "", line 1, in ImportError: cannot import name 'setup_environ"
Upvotes: 0
Views: 497
Reputation: 344
Goto : PyCharm > Tools > Run django Console >
from django.contrib.auth.models import User
User.objects.create_superuser(username='yourUsername', password='YourPassword', email='[email protected]')
Cheers !
Upvotes: 0
Reputation: 4493
What version of python and django?
It looks like it was a bug fixed in http://forum.jetbrains.com/thread/PyCharm-2221
Upvotes: 1