A Django app to signup, activation, login and logout.
pip install django-user-login-register-activate
INSTALLED_APPS = [
...
'login',
]
EMAIL_HOST = "smtp.163.com"
EMAIL_PORT = 25
EMAIL_HOST_USER = "your_email_name@163.com"
EMAIL_HOST_PASSWORD = "your_email_host_password"
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
...
path('accounts/', include('login.urls')),
]
from django.contrib.auth.decorators import login_required
@login_required
def index(request):
return HttpResponse("Hello World.")
- Login page
- Sign up page