from django.contrib.auth.models import User
usr = User.objects.get(username='your username')
usr.is_superuser=True
usr.is_staff=True
usr.set_password('raw password')
usr.save()
>>> from django.contrib.auth.models import User
>>> u = User.objects.get(username='john')
>>> u.set_password('new password')
>>> u.save()