Skip to content
Snippets Groups Projects
Commit 81c304f3 authored by Christian Dresen's avatar Christian Dresen
Browse files

[WarpInfra] Several Fixes

parent 8d8e4ea4
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,8 @@ def register(request):
except ValidationError as e:
page_context["error"] = _("err_invalid_email_format")
page_context["error"] = ""
if username == "" or email == "" or password == "" or password2 == "":
page_context['error'] = _("err_fill_all_fields")
elif not re.search(r'^\w+$', username):
......
......@@ -42,6 +42,8 @@ SECRET_KEY = config.get('security','SECRET_KEY')
# DEBUG
DEBUG = config.getboolean('debug','DEBUG')
ALLOWED_HOSTS = [config.get('security','ALLOWED_HOSTS')]
LOGIN_URL = 'two_factor:login'
LOGOUT_URL = 'logout'
LOGIN_REDIRECT_URL = '/'
......@@ -49,8 +51,6 @@ LOGIN_REDIRECT_URL = '/'
MEDIA_ROOT = 'templates/media/'
MEDIA_URL = '/media/'
ALLOWED_HOSTS = []
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment