Advertisement
Guest User

Untitled

a guest
Mar 4th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.56 KB | None | 0 0
  1. IntegrityError at /api/orders/
  2. duplicate key value violates unique constraint "orders_order_pkey"
  3. DETAIL: Key (id)=(22123) already exists.
  4.  
  5.  
  6. Request Method: POST
  7. Request URL: http://92.243.101.149:8000/api/orders/?format=json
  8. Django Version: 2.0.7
  9. Python Executable: /usr/local/bin/python3.6
  10. Python Version: 3.6.8
  11. Python Path: ['/code', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/site-packages', '/code/project/applications']
  12. Server time: Пн, 4 Мар 2019 07:16:17 +0000
  13. Installed Applications:
  14. ('corsheaders',
  15. 'django_filters',
  16. 'django.contrib.auth',
  17. 'django.contrib.sessions',
  18. 'django.contrib.contenttypes',
  19. 'rest_framework',
  20. 'rest_framework.authtoken',
  21. 'rest_framework_extensions',
  22. 'admin_tools',
  23. 'admin_tools.theming',
  24. 'admin_tools.menu',
  25. 'admin_tools.dashboard',
  26. 'grappelli_modeltranslation',
  27. 'debug_toolbar',
  28. 'modeltranslation',
  29. 'django.contrib.admin',
  30. 'django.contrib.messages',
  31. 'django.contrib.staticfiles',
  32. 'rest_auth',
  33. 'drf_yasg',
  34. 'core',
  35. 'utils',
  36. 'urls',
  37. 'profiles',
  38. 'management',
  39. 'orders',
  40. 'couriers',
  41. 'analytics',
  42. 'clients',
  43. 'events',
  44. 'finances')
  45. Installed Middleware:
  46. ('debug_toolbar.middleware.DebugToolbarMiddleware',
  47. 'corsheaders.middleware.CorsMiddleware',
  48. 'django.middleware.http.ConditionalGetMiddleware',
  49. 'django.contrib.sessions.middleware.SessionMiddleware',
  50. 'django.middleware.common.CommonMiddleware',
  51. 'django.middleware.csrf.CsrfViewMiddleware',
  52. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  53. 'django.contrib.messages.middleware.MessageMiddleware',
  54. 'django.middleware.clickjacking.XFrameOptionsMiddleware')
  55.  
  56.  
  57. Traceback:
  58.  
  59. File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
  60. 85. return self.cursor.execute(sql, params)
  61.  
  62. The above exception (duplicate key value violates unique constraint "orders_order_pkey"
  63. DETAIL: Key (id)=(22123) already exists.
  64. ) was the direct cause of the following exception:
  65.  
  66. File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  67. 35. response = get_response(request)
  68.  
  69. File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  70. 128. response = self.process_exception_by_middleware(e, request)
  71.  
  72. File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  73. 126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  74.  
  75. File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
  76. 54. return view_func(*args, **kwargs)
  77.  
  78. File "/usr/local/lib/python3.6/site-packages/rest_framework/viewsets.py" in view
  79. 116. return self.dispatch(request, *args, **kwargs)
  80.  
  81. File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
  82. 495. response = self.handle_exception(exc)
  83.  
  84. File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in handle_exception
  85. 455. self.raise_uncaught_exception(exc)
  86.  
  87. File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
  88. 492. response = handler(request, *args, **kwargs)
  89.  
  90. File "/usr/local/lib/python3.6/site-packages/rest_framework/mixins.py" in create
  91. 21. self.perform_create(serializer)
  92.  
  93. File "/usr/local/lib/python3.6/site-packages/rest_framework/mixins.py" in perform_create
  94. 26. serializer.save()
  95.  
  96. File "/usr/local/lib/python3.6/site-packages/rest_framework/serializers.py" in save
  97. 214. self.instance = self.create(validated_data)
  98.  
  99. File "/usr/local/lib/python3.6/contextlib.py" in inner
  100. 52. return func(*args, **kwds)
  101.  
  102. File "/code/project/applications/orders/serializers.py" in create
  103. 219. contact_phone=validated_data.get('contact_phone')
  104.  
  105. File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py" in manager_method
  106. 82. return getattr(self.get_queryset(), name)(*args, **kwargs)
  107.  
  108. File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in create
  109. 417. obj.save(force_insert=True, using=self.db)
  110.  
  111. File "/code/project/mixins/model_mixins.py" in save
  112. 40. super(ModelDiffMixin, self).save(*args, **kwargs)
  113.  
  114. File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py" in save
  115. 729. force_update=force_update, update_fields=update_fields)
  116.  
  117. File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py" in save_base
  118. 759. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  119.  
  120. File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py" in _save_table
  121. 842. result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  122.  
  123. File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py" in _do_insert
  124. 880. using=using, raw=raw)
  125.  
  126. File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py" in manager_method
  127. 82. return getattr(self.get_queryset(), name)(*args, **kwargs)
  128.  
  129. File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in _insert
  130. 1125. return query.get_compiler(using=using).execute_sql(return_id)
  131.  
  132. File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
  133. 1285. cursor.execute(sql, params)
  134.  
  135. File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
  136. 100. return super().execute(sql, params)
  137.  
  138. File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
  139. 68. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  140.  
  141. File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute_with_wrappers
  142. 77. return executor(sql, params, many, context)
  143.  
  144. File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
  145. 85. return self.cursor.execute(sql, params)
  146.  
  147. File "/usr/local/lib/python3.6/site-packages/django/db/utils.py" in __exit__
  148. 89. raise dj_exc_value.with_traceback(traceback) from exc_value
  149.  
  150. File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
  151. 85. return self.cursor.execute(sql, params)
  152.  
  153. Exception Type: IntegrityError at /api/orders/
  154. Exception Value: duplicate key value violates unique constraint "orders_order_pkey"
  155. DETAIL: Key (id)=(22123) already exists.
  156.  
  157. Request information:
  158. USER: AnonymousUser
  159.  
  160. GET:
  161. format = 'json'
  162.  
  163. POST: No POST data
  164.  
  165. FILES: No FILES data
  166.  
  167. COOKIES: No cookie data
  168.  
  169. META:
  170. API_HOST = 'restapi:8000'
  171. CONTENT_LENGTH = '2607'
  172. CONTENT_TYPE = 'application/json'
  173. C_FORCE_ROOT = 'true'
  174. DISABLE_DEBUG_SESSIONS = 'true'
  175. DJANGO_SETTINGS_MODULE = 'project.settings'
  176. GATEWAY_INTERFACE = 'CGI/1.1'
  177. GPG_KEY = '0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D'
  178. HOME = '/root'
  179. HOST = 'localhost:3030'
  180. HOSTNAME = '112603ec4136'
  181. HTTP_ACCEPT = '*/*'
  182. HTTP_ACCEPT_ENCODING = 'gzip, deflate'
  183. HTTP_ACCEPT_LANGUAGE = 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7'
  184. HTTP_CONNECTION = 'keep-alive'
  185. HTTP_HOST = '92.243.101.149:8000'
  186. HTTP_ORIGIN = 'http://localhost:3030'
  187. HTTP_REFERER = 'http://localhost:3030/'
  188. HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36'
  189. LANG = 'C.UTF-8'
  190. LOGO_POSTFIX = 'ptichka'
  191. PATH = '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
  192. PATH_INFO = '/api/orders/'
  193. PGDATA = '/var/lib/postgresql/data/pgdata'
  194. POSTGRES_DB = 'ptchk-db'
  195. POSTGRES_HOST = 'ptichka-db'
  196. POSTGRES_PORT = '5432'
  197. POSTGRES_USER = 'postgres'
  198. PROJECT_PATH = ''
  199. PWD = '/code'
  200. PYTHONUNBUFFERED = '1'
  201. PYTHON_PIP_VERSION = '19.0.1'
  202. PYTHON_VERSION = '3.6.8'
  203. QUERY_STRING = 'format=json'
  204. REMOTE_ADDR = '92.243.101.149'
  205. REMOTE_HOST = ''
  206. REQUEST_METHOD = 'POST'
  207. SCRIPT_NAME = ''
  208. SERVER_NAME = '112603ec4136'
  209. SERVER_PORT = '8000'
  210. SERVER_PROTOCOL = 'HTTP/1.1'
  211. SERVER_SOFTWARE = 'WSGIServer/0.2'
  212. SHLVL = '1'
  213. TZ = 'Etc/UTC'
  214. _ = '/usr/local/bin/python3.6'
  215. wsgi.errors = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>
  216. wsgi.file_wrapper = ''
  217. wsgi.input = <_io.BufferedReader name=11>
  218. wsgi.multiprocess = False
  219. wsgi.multithread = True
  220. wsgi.run_once = False
  221. wsgi.url_scheme = 'http'
  222. wsgi.version = '(1, 0)'
  223.  
  224. Settings:
  225. Using settings module project.settings
  226. ABSOLUTE_URL_OVERRIDES = {}
  227. ADMINS = "(('Sergey', 'YOUR@EMAIL.com'),)"
  228. ADMIN_HEADER_COLOR = '#4CAF50'
  229. ADMIN_TIME_ZONE = 'Europe/Moscow'
  230. ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'project.dashboard.CustomAppIndexDashboard'
  231. ADMIN_TOOLS_INDEX_DASHBOARD = 'project.dashboard.CustomIndexDashboard'
  232. ADMIN_TOOLS_MENU = 'project.menu.CustomMenu'
  233. ALLOWED_HOSTS = ['*']
  234. ANONYMOUS_USER_ID = -1
  235. API_KEY = '********************'
  236. APPEND_SLASH = True
  237. AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
  238. AUTH_PASSWORD_VALIDATORS = '********************'
  239. AUTH_USER_MODEL = 'profiles.User'
  240. AWS_MESSAGING_REGION = 'us-west-1'
  241. B2P_CASH_OUT_COMMISSION = 10
  242. B2P_CASH_OUT_COMMISSION_LIMIT = 500
  243. BASE_DIR = '/code'
  244. BOWER_COMPONENTS_ROOT = '/code/public/components'
  245. BOWER_INSTALLED_APPS = "('jquery#2.0.3', 'jquery-ui#~1.10.3', 'd3#3.3.6', 'nvd3#1.1.12-beta')"
  246. CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
  247. CACHE_MIDDLEWARE_ALIAS = 'default'
  248. CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
  249. CACHE_MIDDLEWARE_SECONDS = 600
  250. CARD_ENROLL_CALLBACK_URL_FAIL = 'https://ptchk.ru/card_and_phone_callback_url_fail'
  251. CARD_ENROLL_CALLBACK_URL_SUCCESS = 'https://ptchk.ru/card_and_phone_callback_url_success'
  252. CASHBOX_NAME = 'Cashbox'
  253. CITY_CODE = 'msk'
  254. CLIENTS_REQUIRE_PHONE_CONFIRMATION = True
  255. CLIENT_CABINET_PURCHASE_REFERER = 'https://ptchk.ru/cabinet'
  256. CLIENT_PASSWORD_LENGTH = '********************'
  257. CLOUDPAYMENTS_IP_ADDRESSES = ['130.193.70.192', '185.98.85.109']
  258. CLOUD_WATCH_GROUP = ''
  259. CLOUD_WATCH_STREAM = ''
  260. COMPRESS_ENABLED = True
  261. COMPRESS_OFFLINE = True
  262. COMPRESS_OUTPUT_DIR = ''
  263. COMPRESS_PRECOMPILERS = "(('text/coffeescript', 'coffee --compile --stdio'), ('text/x-sass', 'sass {infile} {outfile}'))"
  264. CORS_ALLOW_CREDENTIALS = True
  265. CORS_ALLOW_HEADERS = "('x-requested-with', 'content-type', 'accept', 'origin', 'authorization', 'x-csrftoken')"
  266. CORS_ALLOW_METHODS = "('GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS')"
  267. CORS_ORIGIN_ALLOW_ALL = False
  268. CORS_ORIGIN_WHITELIST = "('localhost:3030', 'local.ptichka:3030', 'order-form.fullstack-development.com', 'order-form-eng.fullstack-development.com', 'ptichka.moscow', '80662049.ngrok.io')"
  269. COURIERS_REQUIRE_PHONE_CONFIRMATION = True
  270. CRON_COMMON_LOG_PATH = '/code/logs/cron.log'
  271. CRON_RESULT_LOG_PATH = '/code/logs/cron-results.log'
  272. CRON_SQL_FOLDER = 'for_crontab'
  273. CRON_TASKS_DIR = '/code/tasks'
  274. CRON_USER = ''
  275. CSRF_COOKIE_AGE = 31449600
  276. CSRF_COOKIE_DOMAIN = None
  277. CSRF_COOKIE_HTTPONLY = False
  278. CSRF_COOKIE_NAME = 'csrftoken'
  279. CSRF_COOKIE_PATH = '/'
  280. CSRF_COOKIE_SECURE = False
  281. CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
  282. CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
  283. CSRF_TRUSTED_ORIGINS = []
  284. CSRF_USE_SESSIONS = False
  285. DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'ptchk-db', 'USER': 'postgres', 'PASSWORD': '********************', 'HOST': 'ptichka-db', 'PORT': 5432, 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
  286. DATABASE_ROUTERS = []
  287. DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
  288. DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
  289. DATETIME_FORMAT = 'N j, Y, P'
  290. 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']
  291. DATE_FORMAT = 'N j, Y'
  292. 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']
  293. DEBUG = True
  294. DEBUG_PROPAGATE_EXCEPTIONS = False
  295. DECIMAL_SEPARATOR = '.'
  296. DEFAULT_CHARSET = 'utf-8'
  297. DEFAULT_CONTENT_TYPE = 'text/html'
  298. DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
  299. DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
  300. DEFAULT_FROM_EMAIL = 'xxx@gmail.com'
  301. DEFAULT_INDEX_TABLESPACE = ''
  302. DEFAULT_TABLESPACE = ''
  303. DEPOSIT_CALLBACK_URL_FAIL = 'http://ptchk.ru/cancel_topup'
  304. DEPOSIT_CALLBACK_URL_SUCCESS = 'http://ptchk.ru/success_topup'
  305. DEPOSIT_PAYMENT_GATEWAY = 'best2pay'
  306. DISALLOWED_USER_AGENTS = []
  307. EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  308. EMAIL_HOST = 'smtp.gmail.com'
  309. EMAIL_HOST_PASSWORD = '********************'
  310. EMAIL_HOST_USER = 'xxx@gmail.com'
  311. EMAIL_PORT = 587
  312. EMAIL_SSL_CERTFILE = None
  313. EMAIL_SSL_KEYFILE = '********************'
  314. EMAIL_SUBJECT_PREFIX = '[Django] '
  315. EMAIL_TIMEOUT = None
  316. EMAIL_USE_LOCALTIME = False
  317. EMAIL_USE_SSL = False
  318. EMAIL_USE_TLS = True
  319. ENABLE_MESSAGING = True
  320. ERROR_LOG_FILE = '/code/logs/error.log'
  321. FAVICON = 'admin_favicons/local.ico'
  322. FILE_CHARSET = 'utf-8'
  323. FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
  324. FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
  325. FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
  326. FILE_UPLOAD_PERMISSIONS = None
  327. FILE_UPLOAD_TEMP_DIR = None
  328. FIRST_DAY_OF_WEEK = 0
  329. FIXTURE_DIRS = []
  330. FORCE_SCRIPT_NAME = None
  331. FORMAT_MODULE_PATH = None
  332. FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
  333. FREE_CLIENT_HISTORY_LENGTH = 5
  334. FRONTEND_DOMAIN = 'http://localhost:3030'
  335. GOOGLE_SHORTER_URL_API_KEY = '********************'
  336. IGNORABLE_404_URLS = []
  337. INFO_LOG_FILE = '/code/logs/info.log'
  338. INSTALLED_APPS = "('corsheaders', 'django_filters', 'django.contrib.auth', 'django.contrib.sessions', 'django.contrib.contenttypes', 'rest_framework', 'rest_framework.authtoken', 'rest_framework_extensions', 'admin_tools', 'admin_tools.theming', 'admin_tools.menu', 'admin_tools.dashboard', 'grappelli_modeltranslation', 'debug_toolbar', 'modeltranslation', 'django.contrib.admin', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_auth', 'drf_yasg', 'core', 'utils', 'urls', 'profiles', 'management', 'orders', 'couriers', 'analytics', 'clients', 'events', 'finances')"
  339. INTERNAL_BANK_NAME = 'InternalBank'
  340. INTERNAL_IPS = []
  341. IS_STAGING = False
  342. LANGUAGES = "(('ru-RU', 'Russian-RU'), ('en-US', 'English-US'))"
  343. LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
  344. LANGUAGE_CODE = 'ru-RU'
  345. LANGUAGE_COOKIE_AGE = None
  346. LANGUAGE_COOKIE_DOMAIN = None
  347. LANGUAGE_COOKIE_NAME = 'django_language'
  348. LANGUAGE_COOKIE_PATH = '/'
  349. LOCALE_FOLDERS = [{'path': '/code', 'args': '--ignore=static --ignore=applications'}, {'path': '/code/applications/core'}]
  350. LOCALE_PATHS = ['/code', '/code/applications/core']
  351. LOCAL_APPS = "('core', 'utils', 'urls', 'profiles', 'management', 'orders', 'couriers', 'analytics', 'clients', 'events', 'finances')"
  352. LOGGING = {'version': 1, 'disable_existing_loggers': True, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}, 'require_debug_true': {'()': 'django.utils.log.RequireDebugTrue'}}, 'formatters': {'verbose': {'format': '[%(asctime)s]%(levelname)-8s%(name)-30s%(funcName)-20.20s:%(lineno)-4d | %(message)s', 'dateformat': '%H:%M:%S'}}, 'handlers': {'mail_admins': {'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler'}, 'console': {'level': 'DEBUG', 'filters': ['require_debug_true'], 'class': 'logging.StreamHandler', 'formatter': 'verbose'}, 'info.log': {'level': 'INFO', 'formatter': 'verbose', 'class': 'logging.FileHandler', 'filename': '/code/logs/info.log'}, 'error.log': {'level': 'ERROR', 'formatter': 'verbose', 'class': 'logging.FileHandler', 'filename': '/code/logs/error.log'}, 'request.log': {'level': 'WARNING', 'formatter': 'verbose', 'class': 'logging.FileHandler', 'filename': '/code/logs/request.log'}, 'admin_chat_error': {'level': 'ERROR', 'chat': 'errors', 'class': 'utils.logging_handlers.SQSHandler'}}, 'loggers': {'core': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'utils': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'urls': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'profiles': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'management': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'orders': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'couriers': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'analytics': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'clients': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'events': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'finances': {'level': 'INFO', 'handlers': ['console', 'info.log', 'error.log']}, 'django.request': {'level': 'ERROR', 'handlers': ['console', 'mail_admins', 'admin_chat_error', 'request.log']}, 'django.server': {'level': 'INFO', 'handlers': ['console']}}}
  353. LOGGING_CONFIG = 'logging.config.dictConfig'
  354. LOGIN_REDIRECT_URL = '/accounts/profile/'
  355. LOGIN_URL = '/accounts/login/'
  356. LOGOUT_REDIRECT_URL = None
  357. LOG_DEL_ERROR_REPORTS = '/code/logs/del_error_reports.log'
  358. MANAGERS = "(('Sergey', 'YOUR@EMAIL.com'),)"
  359. MAX_NUMBER_OF_EXTRA_SERVICES = 3
  360. MEDIA_ROOT = '/code/public/media'
  361. MEDIA_URL = '/media/'
  362. MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
  363. MIDDLEWARE = "('debug_toolbar.middleware.DebugToolbarMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.http.ConditionalGetMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware')"
  364. MIGRATION_MODULES = {}
  365. MODELTRANSLATION_LANGUAGES = "('ru-RU', 'en-US')"
  366. MONTH_DAY_FORMAT = 'F j'
  367. NUMBER_GROUPING = 0
  368. ORDER_FEEDBACK_FORM_URL = 'https://ptchk.typeform.com/to/NyVeaJ?id='
  369. ORDER_PAY_CALLBACK_URL_FAIL = 'https://ptchk.ru/order_pay_callback_url_fail'
  370. ORDER_PAY_CALLBACK_URL_SUCCESS = 'https://ptchk.ru/order_pay_callback_url_success'
  371. PASSWORD_HASHERS = '********************'
  372. PASSWORD_RESET_TIMEOUT_DAYS = '********************'
  373. PAYMENT_GATEWAYS = {'Best2Pay': {'host': 'https://test.best2pay.net', 'login': 'ptichka.moscow', 'sector': '715', 'signature_password': '********************'}, 'Best2PayP2PMarket': {'host': 'https://test.best2pay.net', 'login': 'ptichka.moscow', 'sector': '892', 'signature_password': '********************'}, 'CloudPayments': {'widget_url': 'https://ptchk.ru/payment/'}}
  374. PAY_OUT_CALLBACK_URL_FAIL = 'https://ptchk.ru/pay_out_callback_url_fail'
  375. PAY_OUT_CALLBACK_URL_SUCCESS = 'https://ptchk.ru/pay_out_callback_url_success'
  376. PREPEND_WWW = False
  377. PROJECT_DOMAIN = 'localhost:3030'
  378. PROJECT_ROOT = '/code/project'
  379. PUBLIC_ROOT = '/code/public'
  380. REQUEST_LOG_FILE = '/code/logs/request.log'
  381. RESTAPI_DOMAIN = '********************'
  382. REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ('couriers.authentication.MobileAppTokenAuthentication', 'rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.BasicAuthentication'), 'DEFAULT_PERMISSION_CLASSES': [], 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', 'PAGE_SIZE': 25}
  383. REST_MAX_PAGE_SIZE_PAGINATION = 100
  384. REST_MAX_PAGE_SIZE_PAGINATION_FOR_COURIERS = 10000
  385. REST_MAX_PAGE_SIZE_PAGINATION_FOR_PUBLICATIONS_AND_LOCATIONS = 10000
  386. ROOT_URLCONF = 'project.urls'
  387. SAVE_ANALYTICS_DAYS_INTERVAL = 30
  388. SECRET_KEY = '********************'
  389. SECURE_BROWSER_XSS_FILTER = False
  390. SECURE_CONTENT_TYPE_NOSNIFF = False
  391. SECURE_HSTS_INCLUDE_SUBDOMAINS = False
  392. SECURE_HSTS_PRELOAD = False
  393. SECURE_HSTS_SECONDS = 0
  394. SECURE_PROXY_SSL_HEADER = None
  395. SECURE_REDIRECT_EXEMPT = []
  396. SECURE_SSL_HOST = None
  397. SECURE_SSL_REDIRECT = False
  398. SELECT2_JS = 'https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'
  399. SERVER_EMAIL = 'root@localhost'
  400. SERVICE_NOTIFICATION_TTL = 600
  401. SESSION_CACHE_ALIAS = 'default'
  402. SESSION_COOKIE_AGE = 1209600
  403. SESSION_COOKIE_DOMAIN = None
  404. SESSION_COOKIE_HTTPONLY = True
  405. SESSION_COOKIE_NAME = 'sessionid'
  406. SESSION_COOKIE_PATH = '/'
  407. SESSION_COOKIE_SECURE = False
  408. SESSION_ENGINE = 'django.contrib.sessions.backends.db'
  409. SESSION_EXPIRE_AT_BROWSER_CLOSE = False
  410. SESSION_FILE_PATH = None
  411. SESSION_SAVE_EVERY_REQUEST = False
  412. SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
  413. SETTINGS_MODULE = 'project.settings'
  414. SET_PHONE_CALLBACK_URL_FAIL = 'https://ptchk.ru/card_and_phone_callback_url_fail'
  415. SET_PHONE_CALLBACK_URL_SUCCESS = 'https://ptchk.ru/card_and_phone_callback_url_success'
  416. SHORT_DATETIME_FORMAT = 'm/d/Y P'
  417. SHORT_DATE_FORMAT = 'm/d/Y'
  418. SHORT_URL_DOMAIN = 'm.pthck.ru'
  419. SHORT_URL_ID_LENGTH = 5
  420. SHORT_URL_UNIQUE_CHECKING_ATTEMPTS = 5
  421. SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
  422. SILENCED_SYSTEM_CHECKS = []
  423. SNS_TOPIC_NAME = 'ptichka-orders'
  424. SQL_FILES_BASE_PATH = '/home/ec2-user/sql'
  425. SQS_QUEUE_NAME = 'rest'
  426. STACK_FAMILY_PREFIX = 'test'
  427. STATICFILES_DIRS = ['project/static']
  428. STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
  429. STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
  430. STATIC_ROOT = '/code/public/static'
  431. STATIC_URL = '/static/'
  432. SWAGGER_SETTINGS = {'exclude_namespaces': [], 'api_version': '********************', 'api_path': '********************', 'enabled_methods': ['get', 'post', 'put', 'patch', 'delete'], 'api_key': '********************', 'is_authenticated': False, 'is_superuser': True, 'permission_denied_handler': None, 'resource_access_handler': None, 'info': {'contact': 'scher56@gmail.com', 'description': 'Not totally RESTful API.', 'license': 'Apache 2.0', 'licenseUrl': 'http://www.apache.org/licenses/LICENSE-2.0.html', 'title': 'Express Delivery Service API'}, 'doc_expansion': 'none'}
  433. TELEGRAM_BOT_NAME = 'Moscow_delivery_bot'
  434. TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/code/templates'], 'APP_DIRS': False, 'OPTIONS': {'context_processors': ['django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.template.context_processors.request', 'django.contrib.messages.context_processors.messages', 'project.context_processors.admin_media'], 'loaders': ['admin_tools.template_loaders.Loader', 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader']}}]
  435. TEST_MIGRATIONS_FILENAME_PATTERN = re.compile('\\d{4}_\\w*.py')
  436. TEST_MIGRATIONS_STARTING_DIR = './project/applications'
  437. TEST_MIGRATIONS_TARGET_DIR = 'migrations_for_tests'
  438. TEST_NON_SERIALIZED_APPS = []
  439. TEST_RUNNER = 'django.test.runner.DiscoverRunner'
  440. TEXTBACK_ACCOUNT_ID = 'd94495e0-fcef-492d-bf03-fe459de928bd'
  441. THIRD_PARTY_APPS = "('corsheaders', 'django_filters', 'django.contrib.auth', 'django.contrib.sessions', 'django.contrib.contenttypes', 'rest_framework', 'rest_framework.authtoken', 'rest_framework_extensions', 'admin_tools', 'admin_tools.theming', 'admin_tools.menu', 'admin_tools.dashboard', 'grappelli_modeltranslation', 'debug_toolbar', 'modeltranslation', 'django.contrib.admin', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_auth', 'drf_yasg')"
  442. THOUSAND_SEPARATOR = ','
  443. TILDA_IP_ADDRESS = '95.213.201.187'
  444. TIME_FORMAT = 'P'
  445. TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
  446. TIME_TO_SHOW_CANCELED_ORDERS = 48
  447. TIME_TO_SHOW_COMPLETED_ORDERS = 48
  448. TIME_ZONE = 'Etc/UTC'
  449. TYPE_FORM_NAME_FOR_MODIFY = 'InfoBTP'
  450. URGENT_1H_COEFFICIENT = 1
  451. URGENT_2H_COEFFICIENT = 3
  452. URGENT_2H_MIN_COMMISSION = 20
  453. URGENT_30M_COEFFICIENT = 1
  454. URGENT_3H_COEFFICIENT = 4
  455. URGENT_3H_MIN_COMMISSION = 10
  456. USE_ETAGS = False
  457. USE_I18N = True
  458. USE_L10N = True
  459. USE_SSL = True
  460. USE_THOUSAND_SEPARATOR = False
  461. USE_TZ = True
  462. USE_X_FORWARDED_HOST = False
  463. USE_X_FORWARDED_PORT = False
  464. WEB_SOCKET_ADDRESS = 'http://127.0.0.1:8888/sockets'
  465. WSGI_APPLICATION = 'project.wsgi.application'
  466. X_FRAME_OPTIONS = 'SAMEORIGIN'
  467. YEAR_MONTH_FORMAT = 'F Y'
  468.  
  469.  
  470. You're seeing this error because you have DEBUG = True in your
  471. Django settings file. Change that to False, and Django will
  472. display a standard page generated by the handler for this status code.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement