I would like to make a registration page for judges, but I would like to make sure that before entering the registration page you have to enter the password, each judge will have the same one that I will make available to them, he needs a simple page with one window to enter the password previously given by me. If someone would be able to say how I can create such a model and then its form, or if there is any other easier way, I will be grateful for any hints
class PasswordJudges(models.Model):
password = models.CharField(max_length = 11)
def __str__(self):
return self.password
class JudgesPassword(forms.ModelForm):
hasło = forms.CharField(widget = forms.PasswordInput())
class Meta:
model = PasswordJudges
fields = ['password']
but in view a have nothing because everything i wrote was wrong :/