forked from CGM_Public/pretix_original
Used isort to order all import statements
This commit is contained in:
@@ -9,6 +9,7 @@ tests:
|
|||||||
- cd src
|
- cd src
|
||||||
- pip3 install -q -r requirements.txt
|
- pip3 install -q -r requirements.txt
|
||||||
- flake8 --ignore=E123,F403,F401,N802,C901,W503 .
|
- flake8 --ignore=E123,F403,F401,N802,C901,W503 .
|
||||||
|
- isort -c -rc .
|
||||||
- python3 manage.py check
|
- python3 manage.py check
|
||||||
- make
|
- make
|
||||||
- make compress
|
- make compress
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ install:
|
|||||||
before_script:
|
before_script:
|
||||||
- cd src
|
- cd src
|
||||||
- flake8 --ignore=E123,F403,F401,N802,C901,W503 .
|
- flake8 --ignore=E123,F403,F401,N802,C901,W503 .
|
||||||
|
- isort -c -rc .
|
||||||
- python manage.py check
|
- python manage.py check
|
||||||
script:
|
script:
|
||||||
- make
|
- make
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ Code checks and unit tests
|
|||||||
Before you check in your code into git, always run the static checkers and unit tests::
|
Before you check in your code into git, always run the static checkers and unit tests::
|
||||||
|
|
||||||
flake8 .
|
flake8 .
|
||||||
|
isort -c -rc .
|
||||||
python manage.py validate
|
python manage.py validate
|
||||||
py.test
|
py.test
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ Python code
|
|||||||
So please make sure that you *always* follow all other rules and break these rules *only when
|
So please make sure that you *always* follow all other rules and break these rules *only when
|
||||||
it makes sense*.
|
it makes sense*.
|
||||||
|
|
||||||
|
* Use ``isort -rc pretix`` in the source directory to order your imports.
|
||||||
|
|
||||||
* Indent your code with four spaces.
|
* Indent your code with four spaces.
|
||||||
|
|
||||||
* For templates and models, follow the `Django Coding Style`_.
|
* For templates and models, follow the `Django Coding Style`_.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import time
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import time
|
||||||
|
|
||||||
from django.core.cache import caches
|
from django.core.cache import caches
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import copy
|
import copy
|
||||||
from django.db import models
|
|
||||||
from django.forms.models import ModelFormMetaclass, BaseModelForm
|
|
||||||
from django import forms
|
from django import forms
|
||||||
|
from django.db import models
|
||||||
|
from django.forms.models import BaseModelForm, ModelFormMetaclass
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from pretix.base.i18n import I18nFormField
|
|
||||||
from versions.models import Versionable
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from versions.models import Versionable
|
||||||
|
|
||||||
|
from pretix.base.i18n import I18nFormField
|
||||||
|
|
||||||
|
|
||||||
class BaseI18nModelForm(BaseModelForm):
|
class BaseI18nModelForm(BaseModelForm):
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from django import forms
|
|||||||
from django.contrib.auth.hashers import check_password
|
from django.contrib.auth.hashers import check_password
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
# from pytz import common_timezones
|
|
||||||
|
|
||||||
from pretix.base.models import User
|
from pretix.base.models import User
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
from django.conf import settings
|
|
||||||
from django.db.models import TextField, SubfieldBase
|
|
||||||
from django import forms
|
from django import forms
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db.models import SubfieldBase, TextField
|
||||||
from django.utils import translation
|
from django.utils import translation
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,16 @@
|
|||||||
from django.core.urlresolvers import get_script_prefix
|
|
||||||
import pytz
|
|
||||||
|
|
||||||
from django.conf import settings
|
|
||||||
from django.middleware.locale import LocaleMiddleware as BaseLocaleMiddleware
|
|
||||||
from django.utils.translation.trans_real import (
|
|
||||||
get_supported_language_variant,
|
|
||||||
parse_accept_lang_header,
|
|
||||||
language_code_re,
|
|
||||||
check_for_language
|
|
||||||
)
|
|
||||||
from django.utils.translation import LANGUAGE_SESSION_KEY
|
|
||||||
from django.utils import translation, timezone
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from django.utils.cache import patch_vary_headers
|
|
||||||
|
|
||||||
|
import pytz
|
||||||
|
from django.conf import settings
|
||||||
|
from django.core.urlresolvers import get_script_prefix
|
||||||
|
from django.middleware.locale import LocaleMiddleware as BaseLocaleMiddleware
|
||||||
|
from django.utils import timezone, translation
|
||||||
|
from django.utils.cache import patch_vary_headers
|
||||||
|
from django.utils.translation import LANGUAGE_SESSION_KEY
|
||||||
|
from django.utils.translation.trans_real import (
|
||||||
|
check_for_language, get_supported_language_variant, language_code_re,
|
||||||
|
parse_accept_lang_header,
|
||||||
|
)
|
||||||
|
|
||||||
_supported = None
|
_supported = None
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from django.contrib.auth.hashers import make_password
|
|
||||||
|
|
||||||
from django.db import models, migrations
|
|
||||||
import pretix.base.models
|
|
||||||
import django.db.models.deletion
|
|
||||||
import pretix.base.i18n
|
|
||||||
import versions.models
|
|
||||||
import django.core.validators
|
import django.core.validators
|
||||||
|
import django.db.models.deletion
|
||||||
|
import versions.models
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.contrib.auth.hashers import make_password
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import pretix.base.i18n
|
||||||
|
import pretix.base.models
|
||||||
|
|
||||||
|
|
||||||
def initial_user(apps, schema_editor):
|
def initial_user(apps, schema_editor):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
|
||||||
import django.core.validators
|
import django.core.validators
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|||||||
@@ -1,24 +1,30 @@
|
|||||||
from datetime import datetime, timedelta
|
|
||||||
from itertools import product
|
|
||||||
import copy
|
import copy
|
||||||
import uuid
|
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
|
import uuid
|
||||||
|
from datetime import datetime, timedelta
|
||||||
|
from itertools import product
|
||||||
|
|
||||||
from django.db import models
|
import six
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin
|
from django.contrib.auth.models import (
|
||||||
|
AbstractBaseUser, BaseUserManager, PermissionsMixin,
|
||||||
|
)
|
||||||
|
from django.core.validators import RegexValidator
|
||||||
|
from django.db import models
|
||||||
from django.db.models import Q, Count
|
from django.db.models import Q, Count
|
||||||
|
from django.template.defaultfilters import date as _date
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.template.defaultfilters import date as _date
|
from versions.models import (
|
||||||
from django.core.validators import RegexValidator
|
Versionable as BaseVersionable, VersionedForeignKey,
|
||||||
|
VersionedManyToManyField, get_utc_now,
|
||||||
|
)
|
||||||
|
|
||||||
from pretix.base.i18n import I18nCharField, I18nTextField
|
from pretix.base.i18n import I18nCharField, I18nTextField
|
||||||
from pretix.base.settings import SettingsProxy
|
from pretix.base.settings import SettingsProxy
|
||||||
import six
|
|
||||||
from versions.models import Versionable as BaseVersionable
|
|
||||||
from versions.models import VersionedForeignKey, VersionedManyToManyField, get_utc_now
|
|
||||||
from .types import VariationDict
|
from .types import VariationDict
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.db.models import Sum, Q
|
from django.db.models import Q, Sum
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
|
|
||||||
from django.forms import Form
|
from django.forms import Form
|
||||||
from django.http import HttpRequest
|
from django.http import HttpRequest
|
||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.base.models import Order, CartPosition
|
|
||||||
from pretix.base.services.orders import mark_order_paid
|
|
||||||
|
|
||||||
|
from pretix.base.models import CartPosition, Order
|
||||||
|
from pretix.base.services.orders import mark_order_paid
|
||||||
from pretix.base.settings import SettingsSandbox
|
from pretix.base.settings import SettingsSandbox
|
||||||
from pretix.base.signals import register_payment_providers
|
from pretix.base.signals import register_payment_providers
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
from datetime import timedelta
|
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from pretix import settings
|
|
||||||
|
|
||||||
from pretix.base.models import Quota
|
from pretix.base.models import Quota
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.mail import EmailMessage
|
from django.core.mail import EmailMessage
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
@@ -7,7 +8,7 @@ from django.utils import translation
|
|||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
|
|
||||||
from pretix.base.i18n import LazyI18nString
|
from pretix.base.i18n import LazyI18nString
|
||||||
from pretix.base.models import User, Event
|
from pretix.base.models import Event, User
|
||||||
from pretix.helpers.urls import build_absolute_uri
|
from pretix.helpers.urls import build_absolute_uri
|
||||||
|
|
||||||
logger = logging.getLogger('pretix.base.mail')
|
logger = logging.getLogger('pretix.base.mail')
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
from datetime import timedelta, datetime
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from pretix.base.models import Order, Quota, OrderPosition
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from pretix.base.models import Order, OrderPosition, Quota
|
||||||
from pretix.base.services.mail import mail
|
from pretix.base.services.mail import mail
|
||||||
from pretix.helpers.urls import build_absolute_uri
|
from pretix.helpers.urls import build_absolute_uri
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
from datetime import datetime, date, time
|
|
||||||
import json
|
|
||||||
import decimal
|
import decimal
|
||||||
|
import json
|
||||||
|
from datetime import date, datetime, time
|
||||||
|
|
||||||
import dateutil.parser
|
import dateutil.parser
|
||||||
from django.db.models import Model
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.db.models import Model
|
||||||
from versions.models import Versionable
|
from versions.models import Versionable
|
||||||
|
|
||||||
|
|
||||||
DEFAULTS = {
|
DEFAULTS = {
|
||||||
'user_mail_required': {
|
'user_mail_required': {
|
||||||
'default': 'False',
|
'default': 'False',
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from django import forms
|
|
||||||
|
|
||||||
|
from django import forms
|
||||||
from django.http import HttpRequest, HttpResponse
|
from django.http import HttpRequest, HttpResponse
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.base.models import Order
|
|
||||||
|
|
||||||
|
from pretix.base.models import Order
|
||||||
from pretix.base.settings import SettingsSandbox
|
from pretix.base.settings import SettingsSandbox
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.urlresolvers import resolve, get_script_prefix
|
from django.core.urlresolvers import get_script_prefix, resolve
|
||||||
|
|
||||||
from .signals import html_head, nav_event
|
from .signals import html_head, nav_event
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
from itertools import product
|
from itertools import product
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
@@ -9,9 +10,9 @@ from django.utils.encoding import force_text
|
|||||||
from django.utils.html import format_html
|
from django.utils.html import format_html
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.base.forms import VersionedModelForm
|
|
||||||
|
|
||||||
from pretix.base.models import ItemVariation, Item
|
from pretix.base.forms import VersionedModelForm
|
||||||
|
from pretix.base.models import Item, ItemVariation
|
||||||
|
|
||||||
|
|
||||||
class I18nInlineFormSet(BaseInlineFormSet):
|
class I18nInlineFormSet(BaseInlineFormSet):
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
from django.contrib.auth.forms import AuthenticationForm as BaseAuthenticationForm
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import ugettext as _
|
|
||||||
from django.contrib.auth import authenticate
|
from django.contrib.auth import authenticate
|
||||||
|
from django.contrib.auth.forms import \
|
||||||
|
AuthenticationForm as BaseAuthenticationForm
|
||||||
|
from django.utils.translation import ugettext as _
|
||||||
|
|
||||||
from pretix.base.models import User
|
from pretix.base.models import User
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
from django.conf import settings
|
|
||||||
from django import forms
|
from django import forms
|
||||||
|
from django.conf import settings
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pytz import common_timezones
|
from pytz import common_timezones
|
||||||
|
|
||||||
from pretix.base.forms import VersionedModelForm, SettingsForm
|
from pretix.base.forms import SettingsForm, VersionedModelForm
|
||||||
from pretix.base.models import Event
|
from pretix.base.models import Event
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
import copy
|
import copy
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.forms import BooleanField
|
from django.forms import BooleanField
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.base.forms import VersionedModelForm, I18nModelForm
|
|
||||||
|
from pretix.base.forms import I18nModelForm, VersionedModelForm
|
||||||
from pretix.base.models import (
|
from pretix.base.models import (
|
||||||
Item, ItemCategory, Property, ItemVariation, PropertyValue, Question, Quota,
|
Item, ItemCategory, ItemVariation, Property, PropertyValue, Question,
|
||||||
Versionable)
|
Quota, Versionable,
|
||||||
|
)
|
||||||
from pretix.control.forms import TolerantFormsetModelForm, VariationsField
|
from pretix.control.forms import TolerantFormsetModelForm, VariationsField
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
from pretix.base.forms import VersionedModelForm
|
from pretix.base.forms import VersionedModelForm
|
||||||
|
|
||||||
from pretix.base.models import Order
|
from pretix.base.models import Order
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.base.forms import VersionedModelForm
|
|
||||||
|
|
||||||
|
from pretix.base.forms import VersionedModelForm
|
||||||
from pretix.base.models import Organizer
|
from pretix.base.models import Organizer
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.urlresolvers import resolve, get_script_prefix
|
|
||||||
from django.utils.encoding import force_str
|
|
||||||
from django.shortcuts import resolve_url
|
|
||||||
from django.contrib.auth import REDIRECT_FIELD_NAME
|
from django.contrib.auth import REDIRECT_FIELD_NAME
|
||||||
|
from django.core.urlresolvers import get_script_prefix, resolve
|
||||||
from django.http import HttpResponseNotFound
|
from django.http import HttpResponseNotFound
|
||||||
|
from django.shortcuts import resolve_url
|
||||||
|
from django.utils.encoding import force_str
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
|
|
||||||
from pretix.base.models import Event, Organizer, EventPermission
|
from pretix.base.models import Event, EventPermission, Organizer
|
||||||
|
|
||||||
|
|
||||||
class PermissionMiddleware:
|
class PermissionMiddleware:
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
from pretix.base.signals import EventPluginSignal
|
from pretix.base.signals import EventPluginSignal
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This signal is sent out to build configuration forms for all restriction formsets
|
This signal is sent out to build configuration forms for all restriction formsets
|
||||||
(see plugin API documentation for details).
|
(see plugin API documentation for details).
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
from django import template
|
from django import template
|
||||||
|
from django.utils import formats
|
||||||
from django.utils.html import conditional_escape
|
from django.utils.html import conditional_escape
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
from django.utils import formats
|
|
||||||
|
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
from django.conf.urls import url, include
|
from django.conf.urls import include, url
|
||||||
|
|
||||||
|
from pretix.control.views import (
|
||||||
from pretix.control.views import main, event, item, auth, orders, user, organizer
|
auth, event, item, main, orders, organizer, user,
|
||||||
|
)
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^logout$', auth.logout, name='auth.logout'),
|
url(r'^logout$', auth.logout, name='auth.logout'),
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.shortcuts import render, redirect
|
from django.contrib.auth import (
|
||||||
from django.contrib.auth import login as auth_login, authenticate
|
authenticate, login as auth_login, logout as auth_logout,
|
||||||
from django.contrib.auth import logout as auth_logout
|
)
|
||||||
|
from django.shortcuts import redirect, render
|
||||||
|
|
||||||
from pretix.base.models import User
|
from pretix.base.models import User
|
||||||
from pretix.control.forms.auth import AuthenticationForm, GlobalRegistrationForm
|
from pretix.control.forms.auth import (
|
||||||
|
AuthenticationForm, GlobalRegistrationForm,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def login(request):
|
def login(request):
|
||||||
|
|||||||
@@ -1,21 +1,29 @@
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from django import forms
|
|
||||||
|
|
||||||
|
from django import forms
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
|
from django.core.urlresolvers import reverse
|
||||||
from django.db.models import Sum
|
from django.db.models import Sum
|
||||||
from django.forms import modelformset_factory
|
from django.forms import modelformset_factory
|
||||||
from django.shortcuts import render, redirect
|
from django.shortcuts import redirect, render
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views.generic import FormView
|
from django.views.generic import FormView
|
||||||
from django.views.generic.base import TemplateView
|
from django.views.generic.base import TemplateView
|
||||||
from django.views.generic.detail import SingleObjectMixin
|
from django.views.generic.detail import SingleObjectMixin
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.core.urlresolvers import reverse
|
|
||||||
from pretix.base.forms import VersionedModelForm
|
from pretix.base.forms import VersionedModelForm
|
||||||
from pretix.control.forms.event import ProviderForm, TicketSettingsForm, EventSettingsForm, EventUpdateForm
|
from pretix.base.models import (
|
||||||
from pretix.base.models import Event, OrderPosition, Order, Item, EventPermission, User
|
Event, EventPermission, Item, Order, OrderPosition, User,
|
||||||
from pretix.base.signals import register_payment_providers, register_ticket_outputs
|
)
|
||||||
|
from pretix.base.signals import (
|
||||||
|
register_payment_providers, register_ticket_outputs,
|
||||||
|
)
|
||||||
|
from pretix.control.forms.event import (
|
||||||
|
EventSettingsForm, EventUpdateForm, ProviderForm, TicketSettingsForm,
|
||||||
|
)
|
||||||
from pretix.control.permissions import EventPermissionRequiredMixin
|
from pretix.control.permissions import EventPermissionRequiredMixin
|
||||||
|
|
||||||
from . import UpdateView
|
from . import UpdateView
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +1,33 @@
|
|||||||
from itertools import product
|
from itertools import product
|
||||||
|
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
|
from django.core.urlresolvers import resolve, reverse
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
|
from django.forms.models import inlineformset_factory
|
||||||
|
from django.http import Http404, HttpResponseForbidden, HttpResponseRedirect
|
||||||
|
from django.shortcuts import redirect
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views.generic import ListView
|
from django.views.generic import ListView
|
||||||
from django.views.generic.edit import DeleteView
|
|
||||||
from django.views.generic.base import TemplateView
|
from django.views.generic.base import TemplateView
|
||||||
from django.views.generic.detail import SingleObjectMixin
|
from django.views.generic.detail import SingleObjectMixin
|
||||||
from django.core.urlresolvers import resolve, reverse
|
from django.views.generic.edit import DeleteView
|
||||||
from django.http import HttpResponseRedirect, HttpResponseForbidden, Http404
|
|
||||||
from django.shortcuts import redirect
|
|
||||||
from django.forms.models import inlineformset_factory
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from pretix.base.models import (
|
from pretix.base.models import (
|
||||||
Item, ItemCategory, Property, ItemVariation, PropertyValue, Question, Quota)
|
Item, ItemCategory, ItemVariation, Property, PropertyValue, Question,
|
||||||
from pretix.control.forms.item import ItemVariationForm, QuotaForm, QuestionForm, PropertyForm, PropertyValueForm, \
|
Quota,
|
||||||
CategoryForm
|
)
|
||||||
from pretix.control.forms.item import ItemFormGeneral
|
from pretix.control.forms import I18nInlineFormSet, VariationsField
|
||||||
from pretix.control.permissions import EventPermissionRequiredMixin, event_permission_required
|
from pretix.control.forms.item import (
|
||||||
from pretix.control.forms import VariationsField, I18nInlineFormSet
|
CategoryForm, ItemFormGeneral, ItemVariationForm, PropertyForm,
|
||||||
|
PropertyValueForm, QuestionForm, QuotaForm,
|
||||||
|
)
|
||||||
|
from pretix.control.permissions import (
|
||||||
|
EventPermissionRequiredMixin, event_permission_required,
|
||||||
|
)
|
||||||
from pretix.control.signals import restriction_formset
|
from pretix.control.signals import restriction_formset
|
||||||
from . import UpdateView, CreateView
|
|
||||||
|
from . import CreateView, UpdateView
|
||||||
|
|
||||||
|
|
||||||
class ItemList(ListView):
|
class ItemList(ListView):
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.views.generic import ListView, CreateView, TemplateView
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.views.generic import CreateView, ListView, TemplateView
|
||||||
|
|
||||||
from pretix.base.models import Event, EventPermission, OrganizerPermission
|
from pretix.base.models import Event, EventPermission, OrganizerPermission
|
||||||
from pretix.control.forms.event import EventCreateForm
|
from pretix.control.forms.event import EventCreateForm
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
from itertools import groupby
|
from itertools import groupby
|
||||||
|
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.db.models import Count, Q, Sum
|
from django.db.models import Q, Count, Sum
|
||||||
from django.utils.timezone import now
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.shortcuts import redirect, render
|
from django.shortcuts import redirect, render
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.views.generic import ListView, DetailView, TemplateView, View
|
from django.utils.timezone import now
|
||||||
from pretix.base.models import Order, Quota, OrderPosition, ItemCategory, Item
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.views.generic import DetailView, ListView, TemplateView, View
|
||||||
|
|
||||||
|
from pretix.base.models import Item, ItemCategory, Order, OrderPosition, Quota
|
||||||
from pretix.base.services.orders import mark_order_paid
|
from pretix.base.services.orders import mark_order_paid
|
||||||
from pretix.base.signals import register_payment_providers
|
from pretix.base.signals import register_payment_providers
|
||||||
from pretix.control.forms.orders import ExtendForm
|
from pretix.control.forms.orders import ExtendForm
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ from django.contrib import messages
|
|||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.http import HttpResponseForbidden
|
from django.http import HttpResponseForbidden
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views.generic import ListView, UpdateView, CreateView
|
from django.views.generic import CreateView, ListView, UpdateView
|
||||||
|
|
||||||
from pretix.base.models import Organizer, OrganizerPermission
|
from pretix.base.models import Organizer, OrganizerPermission
|
||||||
from pretix.control.forms.organizer import OrganizerUpdateForm, OrganizerForm
|
from pretix.control.forms.organizer import OrganizerForm, OrganizerUpdateForm
|
||||||
from pretix.control.permissions import OrganizerPermissionRequiredMixin
|
from pretix.control.permissions import OrganizerPermissionRequiredMixin
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth import update_session_auth_hash
|
from django.contrib.auth import update_session_auth_hash
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.views.generic import UpdateView
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.base.forms.user import UserSettingsForm
|
from django.views.generic import UpdateView
|
||||||
|
|
||||||
|
from pretix.base.forms.user import UserSettingsForm
|
||||||
from pretix.base.models import User
|
from pretix.base.models import User
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from urllib.parse import urljoin
|
from urllib.parse import urljoin
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
from pkgutil import extend_path
|
from pkgutil import extend_path
|
||||||
|
|
||||||
__path__ = extend_path(__path__, __name__)
|
__path__ = extend_path(__path__, __name__)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.plugins import PluginType
|
from pretix.base.plugins import PluginType
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,11 +33,10 @@ __version__ = '0.2'
|
|||||||
__all__ = ['MT940', 'rabo_description', 'abn_amro_description',
|
__all__ = ['MT940', 'rabo_description', 'abn_amro_description',
|
||||||
'ing_description']
|
'ing_description']
|
||||||
|
|
||||||
from collections import namedtuple, defaultdict
|
|
||||||
from decimal import Decimal
|
|
||||||
import datetime
|
import datetime
|
||||||
import re
|
import re
|
||||||
|
from collections import defaultdict, namedtuple
|
||||||
|
from decimal import Decimal
|
||||||
|
|
||||||
SECTIONS = {
|
SECTIONS = {
|
||||||
'begin': [':940:'],
|
'begin': [':940:'],
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from collections import defaultdict
|
|
||||||
import io
|
import io
|
||||||
|
from collections import defaultdict
|
||||||
|
|
||||||
from . import mt940
|
from . import mt940
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
from collections import OrderedDict
|
|
||||||
import json
|
import json
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
from django import forms
|
||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django import forms
|
|
||||||
|
|
||||||
from pretix.base.payment import BasePaymentProvider
|
from pretix.base.payment import BasePaymentProvider
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
from django.core.urlresolvers import reverse, resolve
|
from django.core.urlresolvers import resolve, reverse
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.signals import register_payment_providers
|
from pretix.base.signals import register_payment_providers
|
||||||
|
from pretix.control.signals import nav_event
|
||||||
|
|
||||||
from .payment import BankTransfer
|
from .payment import BankTransfer
|
||||||
from pretix.control.signals import nav_event
|
|
||||||
|
|
||||||
|
|
||||||
@receiver(register_payment_providers)
|
@receiver(register_payment_providers)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from django.conf.urls import url
|
|||||||
|
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^control/event/(?P<organizer>[^/]+)/(?P<event>[^/]+)/banktransfer/import/', views.ImportView.as_view(),
|
url(r'^control/event/(?P<organizer>[^/]+)/(?P<event>[^/]+)/banktransfer/import/', views.ImportView.as_view(),
|
||||||
name='import'),
|
name='import'),
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
import csv
|
import csv
|
||||||
from decimal import Decimal
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
from decimal import Decimal
|
||||||
|
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.shortcuts import redirect, render
|
from django.shortcuts import redirect, render
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views.generic import TemplateView
|
from django.views.generic import TemplateView
|
||||||
|
|
||||||
from pretix.base.models import Order, Quota
|
from pretix.base.models import Order, Quota
|
||||||
from pretix.base.services.orders import mark_order_paid
|
from pretix.base.services.orders import mark_order_paid
|
||||||
from pretix.control.permissions import EventPermissionRequiredMixin
|
from pretix.control.permissions import EventPermissionRequiredMixin
|
||||||
from pretix.plugins.banktransfer import csvimport, mt940import
|
from pretix.plugins.banktransfer import csvimport, mt940import
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('pretix.plugins.banktransfer')
|
logger = logging.getLogger('pretix.plugins.banktransfer')
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.plugins import PluginType
|
from pretix.base.plugins import PluginType
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
from collections import OrderedDict
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
import paypalrestsdk
|
||||||
|
from django import forms
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext as __, ugettext_lazy as _
|
||||||
from django.utils.translation import ugettext as __
|
|
||||||
from django import forms
|
|
||||||
import paypalrestsdk
|
|
||||||
from pretix.base.models import Quota
|
|
||||||
from pretix.base.services.orders import mark_order_paid
|
|
||||||
from pretix.base.payment import BasePaymentProvider
|
|
||||||
from pretix.helpers.urls import build_absolute_uri
|
|
||||||
|
|
||||||
|
from pretix.base.models import Quota
|
||||||
|
from pretix.base.payment import BasePaymentProvider
|
||||||
|
from pretix.base.services.orders import mark_order_paid
|
||||||
|
from pretix.helpers.urls import build_absolute_uri
|
||||||
|
|
||||||
logger = logging.getLogger('pretix.plugins.paypal')
|
logger = logging.getLogger('pretix.plugins.paypal')
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
from django.conf.urls import url, include
|
from django.conf.urls import include, url
|
||||||
|
|
||||||
from .views import success, abort, retry
|
|
||||||
|
|
||||||
|
from .views import abort, retry, success
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^paypal/', include([
|
url(r'^paypal/', include([
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import paypalrestsdk
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
import paypalrestsdk
|
from django.utils.translation import ugettext as __, ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.models import Event, Order
|
from pretix.base.models import Event, Order
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.utils.translation import ugettext as __
|
|
||||||
from pretix.helpers.urls import build_absolute_uri
|
from pretix.helpers.urls import build_absolute_uri
|
||||||
from pretix.plugins.paypal.payment import Paypal
|
from pretix.plugins.paypal.payment import Paypal
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('pretix.plugins.paypal')
|
logger = logging.getLogger('pretix.plugins.paypal')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.plugins import PluginType
|
from pretix.base.plugins import PluginType
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.i18n import I18nFormField, I18nTextarea, I18nTextInput
|
from pretix.base.i18n import I18nFormField, I18nTextarea, I18nTextInput
|
||||||
from pretix.base.models import Order
|
from pretix.base.models import Order
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from django.core.urlresolvers import reverse, resolve
|
from django.core.urlresolvers import resolve, reverse
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from django.conf.urls import url
|
|||||||
|
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^control/event/(?P<organizer>[^/]+)/(?P<event>[^/]+)/sendmail/', views.SenderView.as_view(),
|
url(r'^control/event/(?P<organizer>[^/]+)/(?P<event>[^/]+)/sendmail/', views.SenderView.as_view(),
|
||||||
name='send'),
|
name='send'),
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
@@ -10,7 +11,6 @@ from pretix.control.permissions import EventPermissionRequiredMixin
|
|||||||
|
|
||||||
from . import forms
|
from . import forms
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('pretix.plugins.sendmail')
|
logger = logging.getLogger('pretix.plugins.sendmail')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.plugins import PluginType
|
from pretix.base.plugins import PluginType
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
from collections import OrderedDict
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
import stripe
|
||||||
|
from django import forms
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django import forms
|
|
||||||
from pretix.base.models import Quota
|
from pretix.base.models import Quota
|
||||||
|
from pretix.base.payment import BasePaymentProvider
|
||||||
from pretix.base.services.orders import mark_order_paid
|
from pretix.base.services.orders import mark_order_paid
|
||||||
from pretix.helpers.urls import build_absolute_uri
|
from pretix.helpers.urls import build_absolute_uri
|
||||||
import stripe
|
|
||||||
from pretix.base.payment import BasePaymentProvider
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('pretix.plugins.stripe')
|
logger = logging.getLogger('pretix.plugins.stripe')
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ from django.template import Context
|
|||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
|
|
||||||
from pretix.base.signals import register_payment_providers
|
from pretix.base.signals import register_payment_providers
|
||||||
|
|
||||||
from pretix.presale.signals import html_head
|
from pretix.presale.signals import html_head
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
from django.conf.urls import url, include
|
from django.conf.urls import include, url
|
||||||
|
|
||||||
from .views import webhook
|
from .views import webhook
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^stripe/', include([
|
url(r'^stripe/', include([
|
||||||
url(r'^webhook/$', webhook, name='webhook'),
|
url(r'^webhook/$', webhook, name='webhook'),
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import stripe
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.views.decorators.csrf import csrf_exempt
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
from django.views.decorators.http import require_POST
|
from django.views.decorators.http import require_POST
|
||||||
from pretix.base.models import Order, Event
|
|
||||||
from pretix.plugins.stripe.payment import Stripe
|
|
||||||
import stripe
|
|
||||||
|
|
||||||
|
from pretix.base.models import Event, Order
|
||||||
|
from pretix.plugins.stripe.payment import Stripe
|
||||||
|
|
||||||
logger = logging.getLogger('pretix.plugins.stripe')
|
logger = logging.getLogger('pretix.plugins.stripe')
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.plugins import PluginType
|
from pretix.base.plugins import PluginType
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
from io import BytesIO
|
|
||||||
import logging
|
import logging
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
from django.contrib.staticfiles import finders
|
from django.contrib.staticfiles import finders
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.base.ticketoutput import BaseTicketOutput
|
|
||||||
|
|
||||||
|
from pretix.base.ticketoutput import BaseTicketOutput
|
||||||
|
|
||||||
logger = logging.getLogger('pretix.plugins.ticketoutputpdf')
|
logger = logging.getLogger('pretix.plugins.ticketoutputpdf')
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.plugins import PluginType
|
from pretix.base.plugins import PluginType
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
|
||||||
import pretix.base.models
|
|
||||||
import versions.models
|
import versions.models
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import pretix.base.models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
|
from django.forms.models import inlineformset_factory
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.forms.models import inlineformset_factory
|
|
||||||
|
|
||||||
from pretix.base.signals import determine_availability
|
|
||||||
from pretix.base.models import Item
|
from pretix.base.models import Item
|
||||||
from pretix.control.forms import RestrictionInlineFormset, RestrictionForm
|
from pretix.base.signals import determine_availability
|
||||||
|
from pretix.control.forms import RestrictionForm, RestrictionInlineFormset
|
||||||
from pretix.control.signals import restriction_formset
|
from pretix.control.signals import restriction_formset
|
||||||
|
|
||||||
from .models import TimeRestriction
|
from .models import TimeRestriction
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from django.core.urlresolvers import resolve
|
from django.core.urlresolvers import resolve
|
||||||
|
|
||||||
from .signals import html_head
|
from .signals import html_head
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
from django.contrib.auth import authenticate
|
|
||||||
from django.core.validators import RegexValidator
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.forms import Form
|
|
||||||
from django.contrib.auth.forms import AuthenticationForm as BaseAuthenticationForm
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.contrib.auth import authenticate
|
||||||
|
from django.contrib.auth.forms import \
|
||||||
|
AuthenticationForm as BaseAuthenticationForm
|
||||||
|
from django.core.validators import RegexValidator
|
||||||
|
from django.forms import Form
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.models import User
|
from pretix.base.models import User
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.models import Question
|
from pretix.base.models import Question
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
from pretix.base.signals import EventPluginSignal
|
from pretix.base.signals import EventPluginSignal
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This signal is sent out to include code into the HTML <head> tag
|
This signal is sent out to include code into the HTML <head> tag
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
from django.conf.urls import url, include
|
from django.conf.urls import include, url
|
||||||
|
|
||||||
import pretix.presale.views.event
|
|
||||||
import pretix.presale.views.cart
|
import pretix.presale.views.cart
|
||||||
import pretix.presale.views.checkout
|
import pretix.presale.views.checkout
|
||||||
import pretix.presale.views.order
|
import pretix.presale.views.event
|
||||||
import pretix.presale.views.locale
|
import pretix.presale.views.locale
|
||||||
|
import pretix.presale.views.order
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^(?P<organizer>[^/]+)/(?P<event>[^/]+)/', include([
|
url(r'^(?P<organizer>[^/]+)/(?P<event>[^/]+)/', include([
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
from itertools import groupby
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
from itertools import groupby
|
||||||
|
|
||||||
from django.contrib.auth.views import redirect_to_login
|
from django.contrib.auth.views import redirect_to_login
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
|
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from datetime import timedelta
|
|
||||||
import json
|
import json
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth.views import redirect_to_login
|
from django.contrib.auth.views import redirect_to_login
|
||||||
@@ -7,10 +7,10 @@ from django.core.urlresolvers import reverse
|
|||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from django.views.generic import View
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.views.generic import View
|
||||||
|
|
||||||
from pretix.base.models import Item, ItemVariation, Quota, CartPosition
|
from pretix.base.models import CartPosition, Item, ItemVariation, Quota
|
||||||
from pretix.presale.views import EventLoginRequiredMixin, EventViewMixin
|
from pretix.presale.views import EventLoginRequiredMixin, EventViewMixin
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,13 +4,16 @@ from django.db.models import Q, Sum
|
|||||||
from django.http import HttpRequest
|
from django.http import HttpRequest
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.views.generic import TemplateView
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.base.models import CartPosition, QuestionAnswer, OrderPosition
|
from django.views.generic import TemplateView
|
||||||
from pretix.base.services.orders import perform_order, OrderError
|
|
||||||
|
from pretix.base.models import CartPosition, OrderPosition, QuestionAnswer
|
||||||
|
from pretix.base.services.orders import OrderError, perform_order
|
||||||
from pretix.base.signals import register_payment_providers
|
from pretix.base.signals import register_payment_providers
|
||||||
from pretix.presale.forms.checkout import QuestionsForm
|
from pretix.presale.forms.checkout import QuestionsForm
|
||||||
from pretix.presale.views import EventViewMixin, CartDisplayMixin, EventLoginRequiredMixin
|
from pretix.presale.views import (
|
||||||
|
CartDisplayMixin, EventLoginRequiredMixin, EventViewMixin,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class CheckoutView(TemplateView):
|
class CheckoutView(TemplateView):
|
||||||
|
|||||||
@@ -1,25 +1,30 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth import authenticate, logout, update_session_auth_hash
|
from django.contrib.auth import (
|
||||||
|
authenticate, login, logout, update_session_auth_hash,
|
||||||
|
)
|
||||||
from django.core import signing
|
from django.core import signing
|
||||||
from django.core.signing import SignatureExpired, BadSignature
|
from django.core.signing import BadSignature, SignatureExpired
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.db.models import Count
|
from django.db.models import Count
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.contrib.auth import login
|
|
||||||
from django.views.generic import TemplateView, View, UpdateView
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.conf import settings
|
from django.views.generic import TemplateView, UpdateView, View
|
||||||
|
|
||||||
from pretix.base.forms.user import UserSettingsForm
|
from pretix.base.forms.user import UserSettingsForm
|
||||||
from pretix.base.services.mail import mail
|
|
||||||
from pretix.base.models import User
|
from pretix.base.models import User
|
||||||
|
from pretix.base.services.mail import mail
|
||||||
from pretix.helpers.urls import build_absolute_uri
|
from pretix.helpers.urls import build_absolute_uri
|
||||||
from pretix.presale.forms.auth import GlobalRegistrationForm, LocalRegistrationForm, PasswordForgotForm, \
|
from pretix.presale.forms.auth import (
|
||||||
PasswordRecoverForm
|
GlobalRegistrationForm, LocalRegistrationForm, LoginForm,
|
||||||
from pretix.presale.forms.auth import LoginForm
|
PasswordForgotForm, PasswordRecoverForm,
|
||||||
from pretix.presale.views import EventViewMixin, CartDisplayMixin, EventLoginRequiredMixin
|
)
|
||||||
|
from pretix.presale.views import (
|
||||||
|
CartDisplayMixin, EventLoginRequiredMixin, EventViewMixin,
|
||||||
|
)
|
||||||
from pretix.presale.views.cart import CartAdd
|
from pretix.presale.views.cart import CartAdd
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
from django.views.generic import View
|
from django.views.generic import View
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
|
from django.http import HttpResponseForbidden, HttpResponseNotFound
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
|
from django.utils.functional import cached_property
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.utils.functional import cached_property
|
|
||||||
from django.views.generic import TemplateView, View
|
from django.views.generic import TemplateView, View
|
||||||
from django.http import HttpResponseNotFound, HttpResponseForbidden
|
|
||||||
from pretix.base.models import Order, OrderPosition
|
from pretix.base.models import Order, OrderPosition
|
||||||
from pretix.base.signals import register_payment_providers, register_ticket_outputs
|
from pretix.base.signals import (
|
||||||
from pretix.presale.views import EventViewMixin, EventLoginRequiredMixin, CartDisplayMixin
|
register_payment_providers, register_ticket_outputs,
|
||||||
|
)
|
||||||
|
from pretix.presale.views import (
|
||||||
|
CartDisplayMixin, EventLoginRequiredMixin, EventViewMixin,
|
||||||
|
)
|
||||||
from pretix.presale.views.checkout import QuestionsViewMixin
|
from pretix.presale.views.checkout import QuestionsViewMixin
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import configparser
|
import configparser
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from django.contrib.messages import constants as messages # NOQA
|
||||||
from django.utils.crypto import get_random_string
|
from django.utils.crypto import get_random_string
|
||||||
|
from django.utils.translation import ugettext_lazy as _ # NOQA
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read(['/etc/pretix/pretix.cfg', os.path.expanduser('~/.pretix.cfg'), 'pretix.cfg'],
|
config.read(['/etc/pretix/pretix.cfg', os.path.expanduser('~/.pretix.cfg'), 'pretix.cfg'],
|
||||||
@@ -160,7 +163,6 @@ LOCALE_PATHS = (
|
|||||||
'locale',
|
'locale',
|
||||||
)
|
)
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _ # NOQA
|
|
||||||
LANGUAGES = (
|
LANGUAGES = (
|
||||||
('en', _('English')),
|
('en', _('English')),
|
||||||
('de', _('German')),
|
('de', _('German')),
|
||||||
@@ -237,7 +239,6 @@ DEBUG_TOOLBAR_CONFIG = {
|
|||||||
|
|
||||||
INTERNAL_IPS = ('127.0.0.1', '::1')
|
INTERNAL_IPS = ('127.0.0.1', '::1')
|
||||||
|
|
||||||
from django.contrib.messages import constants as messages # NOQA
|
|
||||||
MESSAGE_TAGS = {
|
MESSAGE_TAGS = {
|
||||||
messages.INFO: 'alert-info',
|
messages.INFO: 'alert-info',
|
||||||
messages.ERROR: 'alert-danger',
|
messages.ERROR: 'alert-danger',
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
from django.apps import apps
|
from django.apps import apps
|
||||||
from django.conf.urls import include, url
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.conf.urls import include, url
|
||||||
|
|
||||||
import pretix.control.urls
|
import pretix.control.urls
|
||||||
import pretix.presale.urls
|
import pretix.presale.urls
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^control/', include(pretix.control.urls, namespace='control')),
|
url(r'^control/', include(pretix.control.urls, namespace='control')),
|
||||||
# The pretixpresale namespace is configured at the bottom of this file, because it
|
# The pretixpresale namespace is configured at the bottom of this file, because it
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ coverage
|
|||||||
selenium
|
selenium
|
||||||
pytest
|
pytest
|
||||||
pytest-django
|
pytest-django
|
||||||
|
isort
|
||||||
# PyVirtualDisplay
|
# PyVirtualDisplay
|
||||||
# -e git+https://github.com/pretix/sauceclient.git@master#egg=sauceclient
|
# -e git+https://github.com/pretix/sauceclient.git@master#egg=sauceclient
|
||||||
# travis
|
# travis
|
||||||
|
|||||||
@@ -3,3 +3,12 @@ ignore = N802,W503
|
|||||||
max-line-length = 160
|
max-line-length = 160
|
||||||
exclude = migrations,.ropeproject,static,mt940.py,_static
|
exclude = migrations,.ropeproject,static,mt940.py,_static
|
||||||
max-complexity = 11
|
max-complexity = 11
|
||||||
|
|
||||||
|
[isort]
|
||||||
|
combine_as_imports = true
|
||||||
|
default_section = THIRDPARTY
|
||||||
|
include_trailing_comma = true
|
||||||
|
known_first_party = pretix
|
||||||
|
multi_line_output = 5
|
||||||
|
not_skip = __init__.py
|
||||||
|
skip = make_testdata.py,wsgi.py,bootstrap
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
# Always prefer setuptools over distutils
|
# Always prefer setuptools over distutils
|
||||||
from setuptools import setup, find_packages
|
|
||||||
# To use a consistent encoding
|
# To use a consistent encoding
|
||||||
from codecs import open
|
from codecs import open
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
here = path.abspath(path.dirname(__file__))
|
here = path.abspath(path.dirname(__file__))
|
||||||
|
|
||||||
# Get the long description from the relevant file
|
# Get the long description from the relevant file
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
|
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
|
|
||||||
|
|
||||||
# could use Chrome, Firefox, etc... here
|
# could use Chrome, Firefox, etc... here
|
||||||
BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS')
|
BROWSER = os.environ.get('TEST_BROWSER', 'PhantomJS')
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import random
|
import random
|
||||||
|
|
||||||
from django.test import TestCase
|
|
||||||
from django.core.cache import cache as django_cache
|
from django.core.cache import cache as django_cache
|
||||||
|
from django.test import TestCase
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
|
|
||||||
from pretix.base.models import Event, Organizer
|
from pretix.base.models import Event, Organizer
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.utils import translation
|
from django.utils import translation
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from pretix.base.i18n import LazyI18nString
|
|
||||||
|
|
||||||
from pretix.base.models import Event, Organizer, ItemCategory
|
from pretix.base.i18n import LazyI18nString
|
||||||
|
from pretix.base.models import Event, ItemCategory, Organizer
|
||||||
|
|
||||||
|
|
||||||
class I18nStringTest(TestCase):
|
class I18nStringTest(TestCase):
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
from django.conf import settings
|
|
||||||
from django.utils.timezone import now
|
|
||||||
from django.core import mail as djmail
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from django.conf import settings
|
||||||
|
from django.core import mail as djmail
|
||||||
|
from django.utils.timezone import now
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix.base.models import Event, Organizer, User
|
from pretix.base.models import Event, Organizer, User
|
||||||
from pretix.base.services.mail import mail
|
from pretix.base.services.mail import mail
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from django.test import TestCase, Client
|
|
||||||
from django.utils.timezone import now
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.test import Client, TestCase
|
||||||
|
from django.utils.timezone import now
|
||||||
|
|
||||||
from pretix.base.models import Event, Organizer, User
|
from pretix.base.models import Event, Organizer, User
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ from datetime import timedelta
|
|||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
|
|
||||||
from pretix.base.models import (
|
from pretix.base.models import (
|
||||||
Event, Organizer, Item, ItemVariation,
|
CartPosition, Event, Item, ItemVariation, Order, OrderPosition, Organizer,
|
||||||
Property, PropertyValue, User, Quota,
|
Property, PropertyValue, Question, Quota, User,
|
||||||
Order, OrderPosition, CartPosition, Question)
|
)
|
||||||
from pretix.base.services.orders import mark_order_paid
|
from pretix.base.services.orders import mark_order_paid
|
||||||
from pretix.base.types import VariationDict
|
from pretix.base.types import VariationDict
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
from django.conf import settings
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
from pretix.base.models import Event, Organizer
|
from pretix.base.models import Event, Organizer
|
||||||
from pretix.base.plugins import get_all_plugins
|
from pretix.base.plugins import get_all_plugins
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
from datetime import datetime, time, date
|
from datetime import date, datetime, time
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
|
|
||||||
from pretix.base.models import Event, Organizer, User, OrganizerSetting
|
|
||||||
from pretix.base import settings
|
from pretix.base import settings
|
||||||
|
from pretix.base.models import Event, Organizer, OrganizerSetting, User
|
||||||
from pretix.base.settings import SettingsSandbox
|
from pretix.base.settings import SettingsSandbox
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from django.test import TestCase, Client
|
from django.test import Client, TestCase
|
||||||
|
from tests.base import BrowserTest
|
||||||
|
|
||||||
from pretix.base.models import User
|
from pretix.base.models import User
|
||||||
from tests.base import BrowserTest
|
|
||||||
|
|
||||||
|
|
||||||
class LoginFormBrowserTest(BrowserTest):
|
class LoginFormBrowserTest(BrowserTest):
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
import datetime
|
import datetime
|
||||||
from pretix.base.models import User, Organizer, Event, OrganizerPermission, EventPermission
|
|
||||||
from tests.base import BrowserTest
|
from tests.base import BrowserTest
|
||||||
|
|
||||||
|
from pretix.base.models import (
|
||||||
|
Event, EventPermission, Organizer, OrganizerPermission, User,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class EventsTest(BrowserTest):
|
class EventsTest(BrowserTest):
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
|
import datetime
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import datetime
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
from selenium.webdriver.support.select import Select
|
from selenium.webdriver.support.select import Select
|
||||||
from pretix.base.models import User, Organizer, Event, OrganizerPermission, EventPermission, ItemCategory, Property, \
|
|
||||||
PropertyValue, Question, Quota, Item
|
|
||||||
from tests.base import BrowserTest
|
from tests.base import BrowserTest
|
||||||
|
|
||||||
|
from pretix.base.models import (
|
||||||
|
Event, EventPermission, Item, ItemCategory, Organizer, OrganizerPermission,
|
||||||
|
Property, PropertyValue, Question, Quota, User,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ItemFormTest(BrowserTest):
|
class ItemFormTest(BrowserTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
from django.utils.timezone import now
|
|
||||||
import pytest
|
import pytest
|
||||||
from pretix.base.models import Event, Organizer, User, EventPermission, Order, OrganizerPermission, Item, OrderPosition
|
from django.utils.timezone import now
|
||||||
|
|
||||||
|
from pretix.base.models import (
|
||||||
|
Event, EventPermission, Item, Order, OrderPosition, Organizer,
|
||||||
|
OrganizerPermission, User,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
from django.utils.timezone import now
|
|
||||||
import pytest
|
import pytest
|
||||||
from pretix.base.models import Event, Organizer, User, EventPermission, Order, OrganizerPermission
|
from django.utils.timezone import now
|
||||||
|
|
||||||
|
from pretix.base.models import (
|
||||||
|
Event, EventPermission, Order, Organizer, OrganizerPermission, User,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from pretix.base.models import User
|
|
||||||
from tests.base import BrowserTest
|
from tests.base import BrowserTest
|
||||||
|
|
||||||
|
from pretix.base.models import User
|
||||||
|
|
||||||
|
|
||||||
class UserSettingsTest(BrowserTest):
|
class UserSettingsTest(BrowserTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from pretix.helpers.urls import build_absolute_uri
|
|
||||||
from django.core import urlresolvers
|
from django.core import urlresolvers
|
||||||
|
|
||||||
|
from pretix.helpers.urls import build_absolute_uri
|
||||||
|
|
||||||
|
|
||||||
def test_site_url_domain():
|
def test_site_url_domain():
|
||||||
settings.SITE_URL = 'https://example.com'
|
settings.SITE_URL = 'https://example.com'
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
# Do NOT use relative imports here
|
# Do NOT use relative imports here
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ from django.test import TestCase
|
|||||||
from django.utils.timezone import now
|
from django.utils.timezone import now
|
||||||
|
|
||||||
from pretix.base.models import (
|
from pretix.base.models import (
|
||||||
Event, Organizer, Item, Property, PropertyValue, ItemVariation
|
Event, Item, ItemVariation, Organizer, Property, PropertyValue,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Do NOT use relative imports here
|
# Do NOT use relative imports here
|
||||||
from pretix.plugins.timerestriction import signals
|
from pretix.plugins.timerestriction import signals
|
||||||
from pretix.plugins.timerestriction.models import TimeRestriction
|
from pretix.plugins.timerestriction.models import TimeRestriction
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user