small changes
This commit is contained in:
@@ -30,7 +30,7 @@ def document(request, id=None):
|
|||||||
author = epc.createAuthorIfNotExistsFor(
|
author = epc.createAuthorIfNotExistsFor(
|
||||||
name=str(request.user),
|
name=str(request.user),
|
||||||
authorMapper=str(request.user)
|
authorMapper=str(request.user)
|
||||||
)['authorID']
|
)
|
||||||
|
|
||||||
# Create the session on the etherpad-lite side
|
# Create the session on the etherpad-lite side
|
||||||
expires = datetime.datetime.utcnow() + datetime.timedelta(hours=3)
|
expires = datetime.datetime.utcnow() + datetime.timedelta(hours=3)
|
||||||
@@ -39,7 +39,7 @@ def document(request, id=None):
|
|||||||
try:
|
try:
|
||||||
result = epclient.createSession(
|
result = epclient.createSession(
|
||||||
groupID=str(group['groupID']),
|
groupID=str(group['groupID']),
|
||||||
authorID=str(author),
|
authorID=str(author['authorID']),
|
||||||
validUntil=str(int(expires.timestamp()))
|
validUntil=str(int(expires.timestamp()))
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -71,8 +71,9 @@ def document(request, id=None):
|
|||||||
|
|
||||||
# Delete the existing session first
|
# Delete the existing session first
|
||||||
if ('padSessionID' in request.COOKIES):
|
if ('padSessionID' in request.COOKIES):
|
||||||
epclient.deleteSession(request.COOKIES['sessionID'])
|
print(request.COOKIES['sessionid'])
|
||||||
response.delete_cookie('sessionID', server.hostname)
|
# TODO: epclient.deleteSession(request.COOKIES['sessionid'])
|
||||||
|
response.delete_cookie('sessionid', server.hostname)
|
||||||
response.delete_cookie('padSessionID')
|
response.delete_cookie('padSessionID')
|
||||||
|
|
||||||
# Set the new session cookie for both the server and the local site
|
# Set the new session cookie for both the server and the local site
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ DATA_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 * 1024
|
|||||||
CKEDITOR_UPLOAD_PATH = 'upload'
|
CKEDITOR_UPLOAD_PATH = 'upload'
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
'documents.apps.DocumentsConfig',
|
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.admindocs',
|
'django.contrib.admindocs',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
@@ -66,6 +65,7 @@ INSTALLED_APPS = [
|
|||||||
'django_static_jquery_ui',
|
'django_static_jquery_ui',
|
||||||
'posts.apps.PostsConfig',
|
'posts.apps.PostsConfig',
|
||||||
'members.apps.MembersConfig',
|
'members.apps.MembersConfig',
|
||||||
|
'documents.apps.DocumentsConfig',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@@ -114,7 +114,7 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
AUTHENTICATION_BACKENDS = [
|
AUTHENTICATION_BACKENDS = [
|
||||||
'django.contrib.auth.backends.RemoteUserBackend'
|
'django.contrib.auth.backends.RemoteUserBackend',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Password validation
|
# Password validation
|
||||||
|
|||||||
Reference in New Issue
Block a user