Browse Source

Update gitignore

master
Joshua Rubingh 6 months ago
parent
commit
5f9a07fa61
  1. 2
      .gitignore
  2. 3
      VRE/VRE/settings.py
  3. 5
      VRE/VRE/views.py

2
.gitignore vendored

@ -143,7 +143,7 @@ dmypy.json @@ -143,7 +143,7 @@ dmypy.json
cython_debug/
VRE/db.sqlite3*
VRE/media/*
.idea
docker/project.env
VRE/surfnet_conext_secrets.ini
media/

3
VRE/VRE/settings.py

@ -250,7 +250,7 @@ LOGIN_REDIRECT_URL = '/' @@ -250,7 +250,7 @@ LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'
# Email settings for sending out upload invitations.
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
DEFAULT_FROM_EMAIL = config('DEFAULT_FROM_EMAIL', default='Do not reply<no-reply@rug.nl>')
EMAIL_HOST = config('EMAIL_HOST', default='')
EMAIL_HOST_USER = config('EMAIL_HOST_USER', default='')
@ -292,6 +292,7 @@ CORS_ALLOW_HEADERS = config('CORS_ALLOW_HEADERS', default='accept,accept-encodin @@ -292,6 +292,7 @@ CORS_ALLOW_HEADERS = config('CORS_ALLOW_HEADERS', default='accept,accept-encodin
CORS_EXPOSE_HEADERS = CORS_ALLOW_HEADERS
# Needed in order to make cross-site HTTP requests with authentication
CORS_ALLOW_CREDENTIALS = True
# Sentry settings

5
VRE/VRE/views.py

@ -1,9 +1,14 @@ @@ -1,9 +1,14 @@
from django.http import HttpResponse
from django.template import Template
from django.template.context import RequestContext
from django.shortcuts import redirect
def test_login_page(request):
# TODO: We could make some logic here to return to front-end...?
# if (request.user.is_authenticated):
# return redirect('http://localhost:3000/en/researchStudies')
template_string = '''<h1>Login test</h1>{% if user.is_authenticated %}
<p>Current user: {{ user.email }}</p>
<p><a href="{% url 'api:api-info' %}">API Status info</a></p>

Loading…
Cancel
Save