Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_current_site() for django1.9+ #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion vmaig_auth/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
from django import forms
from vmaig_auth.models import VmaigUser
from django.contrib.auth.tokens import default_token_generator
from django.contrib.sites.models import get_current_site
try:
from django.contrib.sites.shortcuts import get_current_site
except:
from django.contrib.sites.models import get_current_site
from django.utils.http import urlsafe_base64_encode
from django.utils.encoding import force_bytes
from django.core.mail import send_mail
Expand Down
5 changes: 4 additions & 1 deletion vmaig_auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
from django.contrib import auth
from django.contrib.auth.forms import PasswordChangeForm, SetPasswordForm
from django.contrib.auth.tokens import default_token_generator
from django.contrib.sites.models import get_current_site
try:
from django.contrib.sites.shortcuts import get_current_site
except:
from django.contrib.sites.models import get_current_site
from django.utils.http import (base36_to_int, is_safe_url,
urlsafe_base64_decode, urlsafe_base64_encode)
from vmaig_auth.forms import VmaigUserCreationForm, VmaigPasswordRestForm
Expand Down