Skip to content
Advertisement

Tag: django

How to to use django createsuperuser –noinput command

I’m fairly new to django and python and guess this is a basic question, but if anyone is able to tell me what I’m doing wrong and/or how to correctly struture a non-interactive django createsuperuser command (https://docs.djangoproject.com/en/3.1/ref/django-admin/#createsuperuser), I’d be really grateful. I would like to use this to create a superuser on a google cloud-run app I have running, and

How to create a form that make user is_active = False?

In my Django project, there are several types of users. User types are lead, manager, analyst. The Leads should change every user’s is_active attribute. I created a form and view for that. I have a users page and every user is listing here with a for loop. What I want is lead can block a user with is_active = False

Advertisement