Browse Source

Following Hironsan review, did some change.

pull/250/head
Guillim 5 years ago
parent
commit
a713dd136a
4 changed files with 7 additions and 4 deletions
  1. 2
      app/app/settings.py
  2. 3
      app/authentification/forms.py
  3. 4
      app/authentification/utils.py
  4. 2
      docker-compose.yml

2
app/app/settings.py

@ -88,7 +88,7 @@ ROOT_URLCONF = 'app.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [path.join(BASE_DIR, 'server/templates'),path.join(BASE_DIR, 'authentification/templates')],
'DIRS': [path.join(BASE_DIR, 'server/templates'), path.join(BASE_DIR, 'authentification/templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [

3
app/authentification/forms.py

@ -1,7 +1,8 @@
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.contrib.auth import get_user_model
User = get_user_model()
class SignupForm(UserCreationForm):
email = forms.EmailField(max_length=200, help_text='Required')

4
app/authentification/utils.py

@ -4,7 +4,9 @@ from django.contrib.auth import login
from django.utils.encoding import force_text
from django.utils.http import urlsafe_base64_decode
from .tokens import account_activation_token
from django.contrib.auth.models import User
from django.contrib.auth import get_user_model
User = get_user_model()
def activate(request, uidb64, token):

2
docker-compose.yml

@ -12,7 +12,7 @@ services:
ADMIN_PASSWORD: "password"
ADMIN_EMAIL: "admin@example.com"
DATABASE_URL: "postgres://doccano:doccano@postgres:5432/doccano?sslmode=disable"
ALLOW_SIGNUP: "True"
ALLOW_SIGNUP: "False"
ports:
- 8000:8000

Loading…
Cancel
Save