Hue User deletion programmatically using hue shell commands

14 views
Skip to first unread message

chhabra....@gmail.com

unread,
May 21, 2020, 7:00:30 AM5/21/20
to Hue-Users
Hi,

We have a cloudera cluster with Hue 3.9 installed. I am trying to automate user deletion from hue. I came across the hue shell commands in which users can run django commands to do things.
I am able to run the below code:
from django.contrib.auth.models import User
u = User.objects.get(username='sample')
u.delete()

This deletes the user but when I run the below method none of the commands is executed.
./build/env/bin/hue shell < script.py

where script.py contains the same three commands. Please help me to solve this issue.
Reply all
Reply to author
Forward
0 new messages