Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法让大摇大摆地使用login_required装饰器?我有几个观点:
login_required
from django.contrib.auth.decorators import login_required @login_required def index(request): pass
有没有办法让我也可以大摇大摆地使用它?它会自动将用户重定向到登录页面,并且很方便。