Changeset View
Changeset View
Standalone View
Standalone View
looper_example_project/settings_common.py
- This file was moved from tests/settings_common.py.
| import pathlib | import pathlib | ||||
| from typing import Any | from typing import Any | ||||
| from dateutil.relativedelta import relativedelta | from dateutil.relativedelta import relativedelta | ||||
| BASE_DIR = pathlib.Path(__file__).absolute().parent.parent | BASE_DIR = pathlib.Path(__file__).absolute().parent.parent | ||||
| DEBUG = True | DEBUG = True | ||||
| USE_TZ = True | USE_TZ = True | ||||
| SECRET_KEY = 'test' | SECRET_KEY = 'test' | ||||
| ROOT_URLCONF = 'tests.urls' | ROOT_URLCONF = 'looper_example_project.urls' | ||||
| INSTALLED_APPS = [ | INSTALLED_APPS = [ | ||||
| 'django.contrib.admin', | 'django.contrib.admin', | ||||
| 'django.contrib.auth', | 'django.contrib.auth', | ||||
| 'django.contrib.messages', | 'django.contrib.messages', | ||||
| 'django.contrib.contenttypes', | 'django.contrib.contenttypes', | ||||
| 'django.contrib.sessions', | 'django.contrib.sessions', | ||||
| 'django.contrib.sites', | 'django.contrib.sites', | ||||
| ▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
| def is_always_authorized_for_customer(user: Any, customer: Any) -> bool: | def is_always_authorized_for_customer(user: Any, customer: Any) -> bool: | ||||
| return True | return True | ||||
| def is_never_authorized_for_customer(user: Any, customer: Any) -> bool: | def is_never_authorized_for_customer(user: Any, customer: Any) -> bool: | ||||
| return False | return False | ||||
| LOOPER_IS_AUTHORIZED_FOR_CUSTOMER_FUNCTION = 'tests.settings.is_always_authorized_for_customer' | LOOPER_IS_AUTHORIZED_FOR_CUSTOMER_FUNCTION = 'looper_example_project.settings.is_always_authorized_for_customer' | ||||
| SUPPORTED_CURRENCIES = {'EUR', 'USD'} | SUPPORTED_CURRENCIES = {'EUR', 'USD'} | ||||
| # This product includes GeoLite2 data created by MaxMind, available from | # This product includes GeoLite2 data created by MaxMind, available from | ||||
| # https://dev.maxmind.com/geoip/geoip2/geolite2/ | # https://dev.maxmind.com/geoip/geoip2/geolite2/ | ||||
| GEOIP2_DB = BASE_DIR / 'looper' / 'GeoLite2-Country_20181002' / 'GeoLite2-Country.mmdb' | GEOIP2_DB = BASE_DIR / 'looper' / 'GeoLite2-Country_20181002' / 'GeoLite2-Country.mmdb' | ||||