Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

533
Views
Delete an user from auth_user table in django

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.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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()
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!