asdasd asdsaa
asdasd asdsaa

Reputation: 5

createsuperuser in Django-pycharm

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

Answers (2)

Saad Bin Shahid
Saad Bin Shahid

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

joel goldstick
joel goldstick

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

Related Questions