mirror of
https://github.com/pretix/pretix.git
synced 2026-05-18 17:24:03 +00:00
Deal with deprecation warnings
This commit is contained in:
@@ -37,7 +37,7 @@ class MultiStringField(TextField):
|
|||||||
def get_prep_lookup(self, lookup_type, value): # NOQA
|
def get_prep_lookup(self, lookup_type, value): # NOQA
|
||||||
raise TypeError('Lookups on multi strings are currently not supported.')
|
raise TypeError('Lookups on multi strings are currently not supported.')
|
||||||
|
|
||||||
def from_db_value(self, value, expression, connection, context):
|
def from_db_value(self, value, expression, connection):
|
||||||
if value:
|
if value:
|
||||||
return [v for v in value.split(DELIMITER) if v]
|
return [v for v in value.split(DELIMITER) if v]
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ def build_invoice(invoice: Invoice) -> Invoice:
|
|||||||
positions = list(
|
positions = list(
|
||||||
invoice.order.positions.select_related('addon_to', 'item', 'tax_rule', 'subevent', 'variation').annotate(
|
invoice.order.positions.select_related('addon_to', 'item', 'tax_rule', 'subevent', 'variation').annotate(
|
||||||
addon_c=Count('addons')
|
addon_c=Count('addons')
|
||||||
)
|
).order_by('positionid', 'id')
|
||||||
)
|
)
|
||||||
|
|
||||||
reverse_charge = False
|
reverse_charge = False
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "error.html" %}
|
{% extends "error.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load static %}
|
||||||
{% block title %}{% trans "Bad Request" %}{% endblock %}
|
{% block title %}{% trans "Bad Request" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<i class="fa fa-frown-o fa-fw big-icon"></i>
|
<i class="fa fa-frown-o fa-fw big-icon"></i>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "error.html" %}
|
{% extends "error.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load static %}
|
||||||
{% block title %}{% trans "Permission denied" %}{% endblock %}
|
{% block title %}{% trans "Permission denied" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<i class="fa fa-fw fa-lock big-icon"></i>
|
<i class="fa fa-fw fa-lock big-icon"></i>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "error.html" %}
|
{% extends "error.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load static %}
|
||||||
{% block title %}{% trans "Not found" %}{% endblock %}
|
{% block title %}{% trans "Not found" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<i class="fa fa-meh-o fa-fw big-icon"></i>
|
<i class="fa fa-meh-o fa-fw big-icon"></i>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "error.html" %}
|
{% extends "error.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load static %}
|
||||||
{% block title %}{% trans "Internal Server Error" %}{% endblock %}
|
{% block title %}{% trans "Internal Server Error" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<i class="fa fa-bolt big-icon fa-fw"></i>
|
<i class="fa fa-bolt big-icon fa-fw"></i>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "error.html" %}
|
{% extends "error.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load static %}
|
||||||
{% block title %}{% trans "Verification failed" %}{% endblock %}
|
{% block title %}{% trans "Verification failed" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<i class="fa fa-frown-o big-icon fa-fw"></i>
|
<i class="fa fa-frown-o big-icon fa-fw"></i>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% load compress %}
|
{% load compress %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load static %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% load compress %}
|
{% load compress %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load static %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "pretixcontrol/organizers/base.html" %}
|
{% extends "pretixcontrol/organizers/base.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load static %}
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
{% block inner %}
|
{% block inner %}
|
||||||
<h1>{% trans "Connect to device:" %} {{ device.name }}</h1>
|
<h1>{% trans "Connect to device:" %} {{ device.name }}</h1>
|
||||||
|
|||||||
@@ -49,7 +49,9 @@ class ItemList(ListView):
|
|||||||
event=self.request.event
|
event=self.request.event
|
||||||
).annotate(
|
).annotate(
|
||||||
var_count=Count('variations')
|
var_count=Count('variations')
|
||||||
).prefetch_related("category")
|
).prefetch_related("category").order_by(
|
||||||
|
'category__position', 'category', 'position'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def item_move(request, item, up=True):
|
def item_move(request, item, up=True):
|
||||||
|
|||||||
@@ -7,15 +7,16 @@ pep8-naming
|
|||||||
flake8==3.7.*
|
flake8==3.7.*
|
||||||
codecov
|
codecov
|
||||||
coverage
|
coverage
|
||||||
pytest==3.6.*
|
pytest==4.4.*
|
||||||
pytest-django
|
pytest-django
|
||||||
pytest-xdist==1.27.*
|
|
||||||
isort
|
isort
|
||||||
pytest-rerunfailures==4.*
|
pytest-rerunfailures==7.*
|
||||||
pytest-mock==1.6.*
|
pytest-mock==1.10.*
|
||||||
pytest-cache
|
|
||||||
pytest-sugar
|
|
||||||
responses
|
responses
|
||||||
potypo
|
potypo
|
||||||
freezegun
|
freezegun
|
||||||
|
|
||||||
|
# Not really required, just nice to have
|
||||||
|
pytest-xdist==1.28.*
|
||||||
|
pytest-cache
|
||||||
|
pytest-sugar
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ skip = make_testdata.py,wsgi.py,bootstrap,celery_app.py,pretix/settings.py,tests
|
|||||||
[tool:pytest]
|
[tool:pytest]
|
||||||
DJANGO_SETTINGS_MODULE=tests.settings
|
DJANGO_SETTINGS_MODULE=tests.settings
|
||||||
addopts =--reruns 3 -rw
|
addopts =--reruns 3 -rw
|
||||||
|
filterwarnings =
|
||||||
|
ignore:The 'warn' method is deprecated:DeprecationWarning
|
||||||
|
ignore:django.contrib.staticfiles.templatetags.static:DeprecationWarning
|
||||||
|
|
||||||
[coverage:run]
|
[coverage:run]
|
||||||
source = pretix
|
source = pretix
|
||||||
|
|||||||
11
src/setup.py
11
src/setup.py
@@ -144,7 +144,7 @@ setup(
|
|||||||
],
|
],
|
||||||
extras_require={
|
extras_require={
|
||||||
'dev': [
|
'dev': [
|
||||||
'django-debug-toolbar==1.1111',
|
'django-debug-toolbar==1.11',
|
||||||
'sqlparse==0.2.1',
|
'sqlparse==0.2.1',
|
||||||
'pycodestyle==2.5.*',
|
'pycodestyle==2.5.*',
|
||||||
'pyflakes==2.1.*',
|
'pyflakes==2.1.*',
|
||||||
@@ -152,13 +152,14 @@ setup(
|
|||||||
'pep8-naming',
|
'pep8-naming',
|
||||||
'coveralls',
|
'coveralls',
|
||||||
'coverage',
|
'coverage',
|
||||||
'pytest==3.6.*',
|
'pytest==4.4.*',
|
||||||
'pytest-django',
|
'pytest-django',
|
||||||
'pytest-xdist==1.27.*',
|
'pytest-xdist==1.28.*',
|
||||||
'isort',
|
'isort',
|
||||||
'pytest-mock==1.6.*',
|
'pytest-mock==1.10.*',
|
||||||
'pytest-rerunfailures',
|
'pytest-rerunfailures==7.*',
|
||||||
'responses',
|
'responses',
|
||||||
|
'potypo',
|
||||||
'freezegun',
|
'freezegun',
|
||||||
],
|
],
|
||||||
'memcached': ['pylibmc'],
|
'memcached': ['pylibmc'],
|
||||||
|
|||||||
Reference in New Issue
Block a user