# Path: src/signup/forms.py
# class SignUpForm(UserCreationForm):
#     email = forms.EmailField(max_length=254, help_text='Required. Inform a valid email address.')
# 
#     class Meta:
#         model = User
#         fields = ('username', 'email', 'password1', 'password2', )
# 
# Path: src/signup/tokens.py
# class AccountActivationTokenGenerator(PasswordResetTokenGenerator):
#     def _make_hash_value(self, user, timestamp):


from django.contrib.auth import login
from django.contrib.auth.models import User
from django.contrib.sites.shortcuts import get_current_site
from django.shortcuts import render, redirect
from django.utils.encoding import force_bytes, force_text
from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode
from django.template.loader import render_to_string
from .forms import SignUpForm
from .tokens import account_activation_token
"""simple-signup views

Copyright (c) 2016 Simple is Better Than Complex
Released under MIT license, https://github.com/sibtc/simple-signup/blob/master/LICENSE

Modified:
  - use application configuration
  - detect if server is http/https

"""


def signup(request):
    if request.method == 'POST':

# Path: src/signup/forms.py
# class SignUpForm(UserCreationForm):
#     email = forms.EmailField(max_length=254, help_text='Required. Inform a valid email address.')
# 
#     class Meta:
#         model = User
#         fields = ('username', 'email', 'password1', 'password2', )
# 
# Path: src/signup/tokens.py
# class AccountActivationTokenGenerator(PasswordResetTokenGenerator):
#     def _make_hash_value(self, user, timestamp):


# Path: src/signup/views.py
from django.contrib.auth import login
from django.contrib.auth.models import User
from django.contrib.sites.shortcuts import get_current_site
from django.shortcuts import render, redirect
from django.utils.encoding import force_bytes, force_text
from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode
from django.template.loader import render_to_string
from .forms import SignUpForm
from .tokens import account_activation_token

"""simple-signup views

Copyright (c) 2016 Simple is Better Than Complex
Released under MIT license, https://github.com/sibtc/simple-signup/blob/master/LICENSE

Modified:
  - use application configuration
  - detect if server is http/https

"""


def signup(request):
    if request.method == 'POST':

        form = SignUpForm(request.POST)