mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-16 13:08:03 +00:00
SITE_URL is now automagically created
This commit is contained in:
@@ -50,7 +50,6 @@ TEMPLATES[0]['OPTIONS']['context_processors'].append(
|
||||
OPENID_CREATE_USERS = True
|
||||
OPENID_UPDATE_DETAILS_FROM_SREG = True
|
||||
|
||||
SITE_URL = 'https://ivatar.io'
|
||||
SITE_NAME = 'ivatar'
|
||||
IVATAR_VERSION = '0.1'
|
||||
|
||||
|
||||
@@ -6,5 +6,4 @@ from ivatar.settings import TEMPLATES # noqa
|
||||
|
||||
SESSION_COOKIE_SECURE = False
|
||||
DEBUG = True
|
||||
SITE_URL = 'http://localhost:8383'
|
||||
TEMPLATES[0]['OPTIONS']['debug'] = True
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Default: useful variables for the base page templates.
|
||||
'''
|
||||
|
||||
from ivatar.settings import IVATAR_VERSION, SITE_NAME, SITE_URL
|
||||
from ivatar.settings import IVATAR_VERSION, SITE_NAME
|
||||
from ipware import get_client_ip
|
||||
|
||||
|
||||
@@ -19,5 +19,5 @@ def basepage(request):
|
||||
context['client_ip'] = client_ip
|
||||
context['ivatar_version'] = IVATAR_VERSION
|
||||
context['site_name'] = SITE_NAME
|
||||
context['site_url'] = SITE_URL
|
||||
context['site_url'] = request.build_absolute_uri('/')
|
||||
return context
|
||||
|
||||
@@ -21,7 +21,7 @@ from .forms import AddEmailForm, UploadPhotoForm, AddOpenIDForm
|
||||
from .models import UnconfirmedEmail, ConfirmedEmail, Photo
|
||||
from .models import UnconfirmedOpenId, ConfirmedOpenId, DjangoOpenIDStore
|
||||
|
||||
from ivatar.settings import MAX_NUM_PHOTOS, MAX_PHOTO_SIZE, SITE_URL
|
||||
from ivatar.settings import MAX_NUM_PHOTOS, MAX_PHOTO_SIZE
|
||||
|
||||
import io
|
||||
|
||||
@@ -461,7 +461,7 @@ class ConfirmOpenIDView(View): # pragma: no cover
|
||||
|
||||
def do_request(self, data, *args, **kwargs):
|
||||
session = {'id': self.request.session.session_key}
|
||||
current_url = SITE_URL + self.request.path
|
||||
current_url = self.request.build_absolute_uri('/') + self.request.path
|
||||
openid_consumer = consumer.Consumer(session, DjangoOpenIDStore())
|
||||
info = openid_consumer.complete(data, current_url)
|
||||
if info.status == consumer.FAILURE:
|
||||
|
||||
Reference in New Issue
Block a user