#django OneToOneField delete problem

4 messages · Page 1 of 1 (latest)

woven osprey
#

hi, in my django student_management_system app if i delete a Student it gets deleted,
but it's OneToOneField User (django's built in User) is not getting deleted,
it still exists in database, ie. in auth_user of db.sqlite3. how to fix this.
github code: https://github.com/anup30/student_management_system
the problem is also written in problem.txt there.

GitHub

Contribute to anup30/student_management_system development by creating an account on GitHub.

strong gyro
#
#

Basically think about the underlying rows, the cascade only kicks in when it would create a constraint violation

woven osprey