Admin (current user) who are logged in can delete himself and I want to avoid that, since it throws the error AnonymousUser.
There are no issues related to this that I can see since most of them are asking for is in Django Admin Site which is not what I want.
Still a newbie so appreciate all the help, folks!
models.py
class Administrator(AbstractUser):
union_position = models.CharField(max_length=100)
association = models.ForeignKey(Association)
class Meta:
db_table = 'Administrator'
views.py
class admin_delete(DeleteView):
model = Administrator
success_url = reverse_lazy('admin_overview')
template_name = 'admin/admin_delete.html'