mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Upgrade to Django 3.0 and other dependencies (#1568)
* Upgrade Django to 3.0 and other dependencies to recent versions * Fix otp version contsraint * Remove six dependency * Resolve some warnings * Fix failing tests * Update django-countries * Resolve all RemovedInDjango31Warnings in test suite * Run isort * Fix import * Update PostgreSQL version on travis
This commit is contained in:
@@ -3,9 +3,10 @@ from django.conf import settings
|
||||
from django.contrib.auth.password_validation import (
|
||||
password_validators_help_texts, validate_password,
|
||||
)
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from pretix.base.models import User
|
||||
from pretix.helpers.dicts import move_to_end
|
||||
|
||||
|
||||
class LoginForm(forms.Form):
|
||||
@@ -36,7 +37,7 @@ class LoginForm(forms.Form):
|
||||
if not settings.PRETIX_LONG_SESSIONS or backend.url:
|
||||
del self.fields['keep_logged_in']
|
||||
else:
|
||||
self.fields.move_to_end('keep_logged_in')
|
||||
move_to_end(self.fields, 'keep_logged_in')
|
||||
|
||||
def clean(self):
|
||||
if all(k in self.cleaned_data for k, f in self.fields.items() if f.required):
|
||||
|
||||
Reference in New Issue
Block a user