Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
26 kB
3
Indexable
Never
AttributeError at /api/gates/sensor-status/
'NoneType' object has no attribute 'sensor_status'

Request Method: POST
Request URL: https://api.staging.2park.io/api/gates/sensor-status/
Django Version: 2.1.1
Python Executable: /usr/local/bin/uwsgi
Python Version: 3.7.3
Python Path: ['.', '', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7', '/usr/local/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages', '/var/www']
Server time: Fri, 14 Jan 2022 11:33:44 +0000
Installed Applications:
['apps.authentication',
 'apps.parking',
 'apps.invoicing',
 'apps.common.phone_auth',
 'apps.reservations',
 'apps.chargers',
 'suit',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'django.contrib.gis',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'allauth.socialaccount.providers.facebook',
 'allauth.socialaccount.providers.google',
 'rest_framework',
 'rest_framework_swagger',
 'rest_framework_gis',
 'rest_framework.authtoken',
 'rest_auth',
 'django_filters',
 'corsheaders',
 'raven.contrib.django.raven_compat']
Installed Middleware:
['raven.contrib.django.middleware.DjangoRestFrameworkCompatMiddleware',
 'raven.contrib.django.middleware.SentryMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'apps.common.middlewares.LocaleMiddleware',
 'apps.common.middlewares.RequestLoggerMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'corsheaders.middleware.CorsMiddleware']


Traceback:

File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
  126.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
  124.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.7/site-packages/newrelic/hooks/framework_django.py" in wrapper
  562.                 return wrapped(*args, **kwargs)

File "/usr/local/lib/python3.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
  54.         return view_func(*args, **kwargs)

File "/usr/local/lib/python3.7/site-packages/rest_framework/viewsets.py" in view
  116.             return self.dispatch(request, *args, **kwargs)

File "/usr/local/lib/python3.7/site-packages/newrelic/hooks/component_djangorestframework.py" in _nr_wrapper_APIView_dispatch_
  60.         return wrapped(*args, **kwargs)

File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
  495.             response = self.handle_exception(exc)

File "/usr/local/lib/python3.7/site-packages/newrelic/hooks/component_djangorestframework.py" in _handle_exception_wrapper
  67.         return wrapped(*args, **kwargs)

File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py" in handle_exception
  455.             self.raise_uncaught_exception(exc)

File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py" in raise_uncaught_exception
  466.         raise exc

File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
  492.             response = handler(request, *args, **kwargs)

File "./apps/parking/views/gate.py" in verify_sensor_status
  95.         status = gate.sensor_status(sensor=data.get('direction'))

Exception Type: AttributeError at /api/gates/sensor-status/
Exception Value: 'NoneType' object has no attribute 'sensor_status'
Request information:
USER: +40748601337

GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES:
csrftoken = 'Mra3CWBvUNsKLMymiPwCdMYdbXHSlAjditivo9z6qH2CPsQZoIl5xIt07jUiHtzr'
sessionid = 'nprb35t0i707ukucqf4t0fg72b4q7358'

META:
CONTENT_LENGTH = '100'
CONTENT_TYPE = 'application/json'
CSRF_COOKIE = 'Mra3CWBvUNsKLMymiPwCdMYdbXHSlAjditivo9z6qH2CPsQZoIl5xIt07jUiHtzr'
DOCUMENT_ROOT = '/usr/share/nginx/html'
HTTP_ACCEPT = 'application/json'
HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'
HTTP_ACCEPT_LANGUAGE = 'en'
HTTP_AUTHORIZATION = 'JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyNzUsImRhdGVfam9pbmVkIjoiMjAyMS0xMi0xMCAxNDo1MjozMSswMDowMCIsImV4cCI6MTY0OTQxNzAxMiwib3JpZ19pYXQiOjE2NDIxNTkxODl9.3MIoNCzzQNGcTb4Biu4i85vtsiUP2QTtIwghbSfdpeQ'
HTTP_CONTENT_LENGTH = '100'
HTTP_CONTENT_TYPE = 'application/json'
HTTP_COOKIE = 'csrftoken=Mra3CWBvUNsKLMymiPwCdMYdbXHSlAjditivo9z6qH2CPsQZoIl5xIt07jUiHtzr; sessionid=nprb35t0i707ukucqf4t0fg72b4q7358'
HTTP_HOST = 'api.staging.2park.io'
HTTP_USER_AGENT = '2park/1.0 CFNetwork/1312 Darwin/21.1.0'
HTTP_X_AMZN_TRACE_ID = 'Root=1-61e15f98-048bd26662b2148a15b5192f'
HTTP_X_FORWARDED_FOR = '109.103.57.41'
HTTP_X_FORWARDED_PORT = '443'
HTTP_X_FORWARDED_PROTO = 'https'
HTTP_X_REQUESTED_WITH = 'XMLHttpRequest'
PATH_INFO = '/api/gates/sensor-status/'
QUERY_STRING = ''
REMOTE_ADDR = '10.139.43.152'
REMOTE_PORT = '28946'
REQUEST_METHOD = 'POST'
REQUEST_SCHEME = 'http'
REQUEST_URI = '/api/gates/sensor-status/'
SCRIPT_NAME = ''
SERVER_NAME = '*.2park.io'
SERVER_PORT = '80'
SERVER_PROTOCOL = 'HTTP/1.1'
uwsgi.core = 1
uwsgi.node = b'ip-10-139-15-93.eu-west-1.compute.internal'
uwsgi.version = b'2.0.17.1'
wsgi.errors = <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>
wsgi.file_wrapper = ''
wsgi.input = <newrelic.api.wsgi_application._WSGIInputWrapper object at 0x7f8494ae1198>
wsgi.multiprocess = True
wsgi.multithread = True
wsgi.run_once = False
wsgi.url_scheme = 'https'
wsgi.version = '(1, 0)'

Settings:
Using settings module main.settings
ABSOLUTE_URL_OVERRIDES = {}
ACCOUNT_ADAPTER = 'apps.authentication.adapters.AccountAdapter'
ACCOUNT_AUTHENTICATION_METHOD = 'username'
ACCOUNT_EMAIL_REQUIRED = False
ACCOUNT_EMAIL_SUBJECT_PREFIX = '[2park.io] '
ACCOUNT_EMAIL_VERIFICATION = 'optional'
ACCOUNT_LOGIN_REDIRECT_URLNAME = '/'
ACCOUNT_LOGOUT_ON_GET = True
ACCOUNT_USERNAME_REQUIRED = False
ADMINS = []
ALLOWED_HOSTS = ['*']
ANDROID_APP_URL = 'https://play.google.com/store/apps/details?id=io.twopark'
APPEND_SLASH = True
APP_NAME = '2park'
AUTHENTICATION_BACKENDS = "('apps.authentication.backends.EmailPhoneAuthenticationBackend', 'django.contrib.auth.backends.ModelBackend')"
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'authentication.User'
AWS_ACCESS_KEY_ID = '********************'
AWS_LOCATION = 'dev'
AWS_S3_CUSTOM_DOMAIN = 'img.2park.io'
AWS_S3_REGION_NAME = 'eu-central-1'
AWS_SECRET_ACCESS_KEY = '********************'
AWS_STORAGE_BUCKET_NAME = 'img.2park.io'
BASE_DIR = '/var/www/main'
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CELERY_BROKER_URL = 'redis://redis-testing.2park.int:6379/3'
CELERY_REDIS_DB = 3
CELERY_REDIS_HOST = 'redis-testing.2park.int'
CELERY_REDIS_PORT = 6379
CELERY_VISIBILITY_TIMEOUT = 3600
CHARGING_SESSION_PRICE_THRESHOLD = 0.1
CONFIG_DEFAULT_USER_TIMEZONE = 'Europe/Bucharest'
CONTRIB_APPS = ['allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.facebook', 'allauth.socialaccount.providers.google', 'rest_framework', 'rest_framework_swagger', 'rest_framework_gis', 'rest_framework.authtoken', 'rest_auth', 'django_filters', 'corsheaders']
CORE_APPS = ['suit', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django.contrib.gis']
CORS_ORIGIN_ALLOW_ALL = True
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False
CUSTOM_APPS = ['apps.authentication', 'apps.parking', 'apps.invoicing', 'apps.common.phone_auth', 'apps.reservations', 'apps.chargers']
DATABASES = {'default': {'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'dev_parkio', 'USER': 'root', 'PASSWORD': '********************', 'HOST': 'parkio-testing-psql.2park.int', 'PORT': '5432', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 50000000
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
DATETIME_FORMAT = 'N j, Y, P'
DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
DATE_FORMAT = 'N j, Y'
DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y']
DEBUG = True
DEBUG_PROPAGATE_EXCEPTIONS = False
DECIMAL_SEPARATOR = '.'
DEFAULT_BILLING_PHONE = '+40744367101'
DEFAULT_CHARSET = 'utf-8'
DEFAULT_CONTENT_TYPE = 'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_EXPIRING_SESSIONS_NOTIFICATION_DELTA = datetime.timedelta(seconds=900)
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
DEFAULT_FROM_EMAIL = '2park<noreply@email.2park.io>'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_LANGUAGE = 'en'
DEFAULT_LOCALE = 'en-US'
DEFAULT_PAGE_SIZE = 25
DEFAULT_RESERVATION_NOTIFICATION_DELTA = datetime.timedelta(seconds=3600)
DEFAULT_SEARCH_LIMIT = 5
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'sendgrid_backend.SendgridBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
ENABLED_PAYMENT_PROVIDER = 'mobilpay'
ENABLE_PASSWORD_VALIDATORS = '********************'
ENABLE_S3 = True
ENABLE_SALES_NOTIFICATION = True
ENV_VARS = {'PARKING_CORS_ORIGIN_ALLOW_ALL': True, 'SAFEHUG_API_KEY': '********************', 'LEKTRICO_URL': 'https://api.staging.lektri.co/api/v1', 'TPARK_XML_URL': '', 'SAFEHUG_CLIENT_ID': '2park', 'DEFAULT_FROM_PHONE': '+40744367101', 'MOBILPAY_USERNAME_EURO': 'twopark', 'GDRIVE_CLIENT_SECRET': '********************', 'AWS_ACCESS_KEY_ID': '********************', 'AWS_LOCATION': 'dev', 'LEKTRICO_HEADER': 'AUTH_HEADER', 'COMPANY_ID_PAYMENTS_EUR': 3, 'APP_NAME': '2park', 'STRIPE_API_KEY': '********************', 'FCMPERSIST_CLIENT_SECRET': '********************', 'MAIL_CHIMP_URL': None, 'ZOHO_TAX_ID': None, 'LEKTRICO_API_KEY': '********************', 'PARKING_DB_NAME': 'dev_parkio', 'MOBILPAY_USERNAME_RON': 'twoparkro', 'LEKTRICO_USER_ID': '13', 'PROJECT_NAME': '2park.io', 'ENABLE_PASSWORD_VALIDATORS': '********************', 'TPARK_HASH': '87be3f256580c455d2603b59a384bb170d17c040ff8fe95196c705daf053173b', 'PARKING_DB_USER': 'root', 'LEKTRICO_VEHICLE_ID': '14', 'MOBILPAY_CERTIFICATE_PATH': '/etc/ssl/certs/server-mobilpay-sandbox-cert.cer', 'TPARK_PASSWORD': '********************', 'EUPLATESC_KEY': '********************', 'PARKING_MEDIA_ROOT': '/var/www/media/', 'STREET_PARKING_MAPPING': '/var/www/street_parking_mapping.json', 'FLAG_AUTH_METHOD': 'sms', 'EXTERNAL_SESSIONS_COMPANY_ID': 2, 'SMTP_PASSWORD': '********************', 'MOBILPAY_PASSWORD_EURO': '********************', 'MOBILPAY_SLAVE_ACCOUNT_ID': '62524', 'CELERY_VISIBILITY_TIMEOUT': 3600, 'CELERY_REDIS_PORT': 6379, 'EUPLATESC_MERCH_ID': '44840986964', 'ZOHO_REFRESH_TOKEN': '********************', 'PARKING_DB_HOST': 'parkio-testing-psql.2park.int', 'PARKING_DB_PORT': '5432', 'SMTP_PORT': '25', 'AWS_SECRET_ACCESS_KEY': '********************', 'ZOHO_CLIENT_SECRET': '********************', 'CHARGING_SESSION_PRICE_THRESHOLD': 0.1, 'ENABLE_SALES_NOTIFICATION': True, 'SQS_REGION_NAME': 'eu-west-1', 'SQS_GRANULARITY_QUEUE_URL': 'https://sqs.eu-west-1.amazonaws.com/779148265909/lambda_sqs-staging', 'PARKING_ENV': 'dev', 'TPARK_URL': 'https://web-stage.tpark.io', 'FLAG_BILLING_ENABLE_PERSONAL_ID': False, 'ZOHO_ORGANIZATION_ID': None, 'ENABLE_LIVE_PAYMENTS': False, 'MAIL_CHIMP_API_KEY': '********************', 'COMPANY_ID_PAYMENTS_RON': 1, 'PARKING_SERVER_URL': 'https://api.staging.2park.io', 'PARKING_SALES_EMAIL_IT': 'claudiu.dumitras@rebeldot.com', 'SENTRY_DSN': 'https://fe1533d97b3a4e938df1467edc3e0637:c1d1ca74c7f54e5cbd7b73a032776d41@sentry.io/261324', 'ENABLE_CELERY': True, 'PARKING_DB_PASSWORD': '********************', 'SMTP_USER': None, 'MOBILPAY_PRIVATE_KEY_PATH': '********************', 'DEFAULT_FROM_EMAIL': '2park<noreply@email.2park.io>', 'SENDGRID_API_KEY': '********************', 'ZOHO_CLIENT_ID': None, 'ENABLE_S3': True, 'MOBILPAY_PASSWORD_RON': '********************', 'LEKTRICO_WEBHOOK_SECRET': '********************', 'SMTP_HOST': None, 'PARKING_WEB_APP_URL': 'https://app.staging.2park.io', 'PARKING_SALES_EMAIL_RO': 'claudiu.dumitras@rebeldot.com', 'FCMPERSIST_URL': 'https://fcmpersist.staging.2park.io', 'CELERY_REDIS_HOST': 'redis-testing.2park.int', 'CELERY_REDIS_DB': 3, 'FLAG_PREVENT_PARKING_LOT_CREATION': True, 'PARKING_STATIC_ROOT': '/var/www/static/', 'SECRET_KEY': '********************', 'PAYMENT_PROVIDER': 'mobilpay', 'MOBILPAY_SIGNATURE': '********************', 'PARKING_DEBUG': True, 'FCMPERSIST_CLIENT_NAME': '2park'}
EUR_PAYMENT_WITHOUT_BILLING_DETAILS = 100
EXTERNAL_SESSIONS_COMPANY_ID = 2
EXTRA_APPS_FOR_TRANSLATION = ['phonenumber_field']
FCMPERSIST_CLIENT_NAME = '2park'
FCMPERSIST_CLIENT_SECRET = '********************'
FCMPERSIST_URL = 'https://fcmpersist.staging.2park.io'
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 50000000
FILE_UPLOAD_PERMISSIONS = None
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FLAG_AUTH_METHOD = 'sms'
FLAG_BILLING_ENABLE_PERSONAL_ID = False
FLAG_PREVENT_PARKING_LOT_CREATION = True
FLAG_REQUIRE_BILLING_PHONE = True
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
GDRIVE_CLIENT_SECRET = '********************'
IGNORABLE_404_URLS = []
INSTALLED_APPS = ['apps.authentication', 'apps.parking', 'apps.invoicing', 'apps.common.phone_auth', 'apps.reservations', 'apps.chargers', 'suit', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django.contrib.gis', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.facebook', 'allauth.socialaccount.providers.google', 'rest_framework', 'rest_framework_swagger', 'rest_framework_gis', 'rest_framework.authtoken', 'rest_auth', 'django_filters', 'corsheaders', 'raven.contrib.django.raven_compat']
INTERNAL_IPS = []
JWT_AUTH = {'JWT_EXPIRATION_DELTA': datetime.timedelta(days=84), 'JWT_REFRESH_EXPIRATION_DELTA': datetime.timedelta(days=364), 'JWT_ALLOW_REFRESH': True, 'JWT_PAYLOAD_HANDLER': 'apps.authentication.utils.jwt_payload_handler'}
LANGUAGES = [('ro', 'Romanian'), ('en', 'English'), ('it', 'Italian')]
LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
LANGUAGES_DICT = {'ro': 'Romanian', 'en': 'English', 'it': 'Italian'}
LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LEKTRICO_API_KEY = '********************'
LEKTRICO_HEADER = 'AUTH_HEADER'
LEKTRICO_URL = 'https://api.staging.lektri.co/api/v1'
LEKTRICO_USER_ID = '13'
LEKTRICO_VEHICLE_ID = '14'
LEKTRICO_WEBHOOK_SECRET = '********************'
LOCALE_PATHS = "('/var/www/locale',)"
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}, 'require_debug_true': {'()': 'django.utils.log.RequireDebugTrue'}}, 'formatters': {'django.server': {'()': 'django.utils.log.ServerFormatter', 'format': '[%(server_time)s] %(message)s'}, 'parking': {'()': 'django.utils.log.ServerFormatter', 'format': '[%(asctime)s] %(levelname)s [%(name)s]: %(message)s', 'datefmt': '%Y-%m-%d %H:%M:%S'}}, 'handlers': {'console': {'level': 'INFO', 'filters': ['require_debug_true'], 'class': 'logging.StreamHandler'}, 'django.server': {'level': 'INFO', 'class': 'logging.StreamHandler', 'formatter': 'parking'}, 'parking': {'level': 'INFO', 'class': 'logging.StreamHandler', 'formatter': 'parking'}, 'mail_admins': {'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler'}, 'sentry': {'level': 'ERROR', 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler'}}, 'loggers': {'django': {'handlers': ['console', 'mail_admins'], 'level': 'INFO'}, 'django.server': {'handlers': ['django.server'], 'level': 'INFO', 'propagate': False}, 'apps': {'handlers': ['parking'], 'level': 'INFO', 'propagate': True}}, 'root': {'level': 'WARNING', 'handlers': ['sentry']}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = '/'
LOGIN_URL = '/login/'
LOGOUT_REDIRECT_URL = None
MAIL_CHIMP_API_KEY = '********************'
MAIL_CHIMP_URL = None
MANAGERS = []
MEDIA_ROOT = '/var/www/media/'
MEDIA_URL = '/media/'
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE = ['raven.contrib.django.middleware.DjangoRestFrameworkCompatMiddleware', 'raven.contrib.django.middleware.SentryMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'apps.common.middlewares.LocaleMiddleware', 'apps.common.middlewares.RequestLoggerMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'corsheaders.middleware.CorsMiddleware']
MIGRATION_MODULES = {}
MIN_SEARCH_CHARACTERS = 3
MONTH_DAY_FORMAT = 'F j'
NEW_RELIC_CONFIG_FILE = 'newrelic.ini'
NEW_RELIC_ENVIRONMENT = 'dev'
NUMBER_GROUPING = 0
OLD_PASSWORD_FIELD_ENABLED = '********************'
PANDAS_DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S'
PANDAS_TIMEDELTA_FORMAT = '{:02d}:{:02d}:{:02d}'
PARKING_ENV = 'dev'
PARKING_LOT_EXCLUDED_TIMEZONES = "('UTC', 'GMT')"
PARKING_SALES_EMAIL_IT = 'claudiu.dumitras@rebeldot.com'
PARKING_SALES_EMAIL_RO = 'claudiu.dumitras@rebeldot.com'
PARKING_SERVER_URL = 'https://api.staging.2park.io'
PARKING_SESSION_LOCK_DELTA = datetime.timedelta(seconds=5)
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
PAYMENTS_COMPANY_IDS = {'RON': 1, 'EUR': 3}
PAYMENT_PROVIDERS = {'mobilpay': {'class': 'apps.parking.providers.mobilpay.MobilpayProvider', 'enabled': True, 'config': {'currency': 'RON', 'username_ron': 'twoparkro', 'password_ron': '********************', 'username_euro': 'twopark', 'password_euro': '********************', 'signature': '********************', 'slave_account_id': '62524', 'return_url': 'https://api.staging.2park.io/api/payments/providers/mobilpay/client/', 'confirm_url': 'https://api.staging.2park.io/api/payments/providers/mobilpay/server/', 'confirm_v2_url': 'https://api.staging.2park.io/api/payments/providers/mobilpay/server/v2/', 'certificate': PosixPath('/etc/ssl/certs/server-mobilpay-sandbox-cert.cer'), 'private_key': '********************', 'endpoint_standard_payment': 'http://sandboxsecure.mobilpay.ro', 'endpoint_cvv_payment': 'http://sandboxsecure.mobilpay.ro/card3', 'endpoint_token_payment': '********************', 'soap_endpoint': 'https://sandboxsecure.mobilpay.ro/api/payment2/?wsdl', 'language_suffix': {'ro': '/ro', 'en': '/en', 'it': '/it'}}}, 'stripe': {'class': 'apps.parking.providers.stripe.StripeProvider', 'enabled': False, 'config': {'api_key': '********************'}}, 'euplatesc': {'class': 'apps.parking.providers.euplatesc.EuplatescProvider', 'enabled': False, 'config': {'currency': 'RON', 'merch_id': '44840986964', 'key': '********************', 'endpoint_standard_payment': 'https://secure.euplatesc.ro/tdsprocess/tranzactd.php'}}}
PHONE_AUTH_OTP_EXPIRATION_DELTA = datetime.timedelta(seconds=600)
PHONE_AUTH_OTP_LENGTH = 6
PHONE_AUTH_PHONE_VERIFICATION = True
PHONE_AUTH_REGISTER_THROTTLING_DELTA = datetime.timedelta(seconds=60)
PHONE_AUTH_UNIQUE_PHONE = True
PREPEND_WWW = False
PROJECT_DIR = '/var/www'
PROJECT_NAME = '2park.io'
RAVEN_CONFIG = {'dsn': 'https://fe1533d97b3a4e938df1467edc3e0637:c1d1ca74c7f54e5cbd7b73a032776d41@sentry.io/261324?timeout=10'}
REST_FRAMEWORK = {'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAuthenticated',), 'DEFAULT_AUTHENTICATION_CLASSES': ('apps.authentication.backends.CustomJSONWebTokenAuthentication', 'rest_framework.authentication.SessionAuthentication'), 'EXCEPTION_HANDLER': 'apps.common.handlers.code_and_message_exception_handler', 'DEFAULT_PAGINATION_CLASS': 'apps.common.pagination.DefaultPagination', 'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend',), 'COERCE_DECIMAL_TO_STRING': False}
REST_USE_JWT = True
ROMANIAN_TZ = 3
RON_PAYMENT_WITHOUT_BILLING_DETAILS = 450
ROOT_URLCONF = 'main.urls'
SAFEHUG_API_KEY = '********************'
SAFEHUG_CLIENT_ID = '2park'
SECRET_KEY = '********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SENDGRID_API_KEY = '********************'
SENDGRID_SANDBOX_MODE_IN_DEBUG = False
SENDSMS_BACKEND = 'apps.common.backends.SafeHugSMSBackend'
SENDSMS_FROM_NUMBER = '+40744367101'
SENTRY_HTTP_CLIENT_TIMEOUT = 10
SERVER_EMAIL = 'root@localhost'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'main.settings'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
SITE_ID = 1
SQS_GRANULARITY_QUEUE_URL = 'https://sqs.eu-west-1.amazonaws.com/779148265909/lambda_sqs-staging'
SQS_REGION_NAME = 'eu-west-1'
STATICFILES_DIRS = []
STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/var/www/static/'
STATIC_URL = '/static/'
STREET_PARKING_MAPPING = '/var/www/street_parking_mapping.json'
SUIT_CONFIG = {'ADMIN_NAME': 'Parking API Admin'}
SWAGGER_SETTINGS = {'USE_SESSION_AUTH': True, 'LOGIN_URL': '/admin/login/', 'LOGOUT_URL': '/admin/logout/'}
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['apps/authentication/templates', 'apps/parking/templates', 'apps/invoicing/templates', 'apps/reservations/templates', 'apps/common/templates'], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}]
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE = 'UTC'
TPARK_DURATION_FOR_1_DAY = '-2'
TPARK_HASH = '87be3f256580c455d2603b59a384bb170d17c040ff8fe95196c705daf053173b'
TPARK_PASSWORD = '********************'
TPARK_URL = 'https://web-stage.tpark.io'
TPARK_XML_URL = ''
USER_INVITATION_LOCK_DELTA = datetime.timedelta(seconds=600)
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WEB_APP_BASE_URL = 'https://app.staging.2park.io'
WEB_APP_ROUTES = {'account_activation': 'https://app.staging.2park.io/account-activation/{key}', 'password_confirmation': '********************'}
WSGI_APPLICATION = 'main.wsgi.application'
X_FRAME_OPTIONS = 'SAMEORIGIN'
YEAR_MONTH_FORMAT = 'F Y'
ZOHO_CLIENT_ID = None
ZOHO_CLIENT_SECRET = '********************'
ZOHO_ORGANIZATION_ID = None
ZOHO_REFRESH_TOKEN = '********************'
ZOHO_TAX_ID = None


You're seeing this error because you have DEBUG = True in your
Django settings file. Change that to False, and Django will
display a standard page generated by the handler for this status code.