使用Django的密码保护页面,但没有用户注册 [英] Password protect page using Django but no user registration

查看:46
本文介绍了使用Django的密码保护页面,但没有用户注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为自己的Django视图之一实现简单的密码保护.理想情况下,当用户访问页面时,他们将看到一个表单,可以在其中输入密码(每个人都使用相同的密码,没有用户帐户),如果正确,则将使用半敏感信息将其转发到视图.密码将在俱乐部会议上亲自通过电子邮件发出.

I am looking to implement simple password protection for one of my Django Views. Ideally, when users visit the page, they will see a form where they can enter the password (same password for everyone, no user accounts) and if it's correct they will be forwarded to the view with semi-sensitive information. The password will be given out in person at club meetings and through email.

我不想实现用户帐户,我希望可以从Django管理面板轻松更改密码.实际的安全强度/加密的优先级很低,因为它只是我希望隐藏的俱乐部成员电话号码的列表.

I don't want to implement users accounts and I would like the password to be easily changeable from the Django admin panel. Actual security strength/encryption is pretty low priority as it is just a list of club member's phone numbers I am hoping to hide.

我已经研究过HTTP Auth,但是我认为这可以工作,因为无法从Django管理页面更改密码.

I have looked into HTTP Auth but I think that would work because the password couldn't be changed from the Django administration page.

实现这种类型的系统最简单的方法是什么?

What is the easiest way to implement this type of system?

推荐答案

也许与此类似的东西可以满足您的需求: https://www.djangopackages.com/packages/p/django-registration-invitationcode-backend/

Maybe something similar to this, will suffice your need: https://www.djangopackages.com/packages/p/django-registration-invitationcode-backend/

您还可以查看 https://www.djangopackages.com/grids/g/authentication/和其他软件包(例如惰性注册和django-privatebeta)都非常符合您的要求.

You can also have a look at https://www.djangopackages.com/grids/g/authentication/, other packages such as lazy signup, and django-privatebeta, are close to your requirements.

这篇关于使用Django的密码保护页面,但没有用户注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆