I have to delete an user from auth_user table. And I am trying to do using from django. I am getting
ProgrammingError: (1146, u"Table 'oculus.auth_user_groups' doesn't exist")
The code I am using is:
from django.contrib.auth.models import User
user = User.objects.filter(id=3306)
user[0].delete()
@EDIT: auth_user_groups table was missing from my db. Got fixed it.
This might help dont use [0].directly use this code:
from django.contrib.auth.models import User
user = User.objects.filter(id=3306)
user.delete()