Revision 0a7a4104 snf-astakos-app/astakos/im/util.py
b/snf-astakos-app/astakos/im/util.py | ||
---|---|---|
47 | 47 |
from django.utils.translation import ugettext as _ |
48 | 48 |
|
49 | 49 |
from astakos.im.models import AstakosUser, Invitation |
50 |
from astakos.im.settings import ( |
|
51 |
COOKIE_DOMAIN, FORCE_PROFILE_UPDATE, LOGIN_SUCCESS_URL) |
|
52 | 50 |
from astakos.im.functions import login |
51 |
from astakos.im import settings |
|
53 | 52 |
|
54 | 53 |
import astakos.im.messages as astakos_messages |
55 | 54 |
|
... | ... | |
170 | 169 |
except ValidationError, e: |
171 | 170 |
return HttpResponseBadRequest(e) |
172 | 171 |
|
173 |
next = restrict_next(next, domain=COOKIE_DOMAIN) |
|
172 |
next = restrict_next(next, domain=settings.COOKIE_DOMAIN)
|
|
174 | 173 |
|
175 |
if FORCE_PROFILE_UPDATE and not user.is_verified and not user.is_superuser: |
|
174 |
if settings.FORCE_PROFILE_UPDATE and \ |
|
175 |
not user.is_verified and not user.is_superuser: |
|
176 | 176 |
params = '' |
177 | 177 |
if next: |
178 | 178 |
params = '?' + urlencode({'next': next}) |
... | ... | |
186 | 186 |
request.session.set_expiry(user.auth_token_expires) |
187 | 187 |
|
188 | 188 |
if not next: |
189 |
next = LOGIN_SUCCESS_URL |
|
189 |
next = settings.LOGIN_SUCCESS_URL
|
|
190 | 190 |
|
191 | 191 |
response['Location'] = next |
192 | 192 |
response.status_code = 302 |
Also available in: Unified diff