· 7 years ago · Nov 29, 2018, 06:00 PM
1RelatedObjectDoesNotExist at /api/client/invest_recommendations/61/complete/
2PayoutProduct has no product.
3
4Request Method: POST
5Request URL: http://176.113.83.31:8000/api/client/invest_recommendations/61/complete/
6Django Version: 2.1.3
7Python Executable: /root/bks-backend/env/bin/python3.6
8Python Version: 3.6.3
9Python Path: ['/root/bks-backend', '/root/bks-backend/env/bin', '/root/bks-backend/env/lib/python36.zip', '/root/bks-backend/env/lib/python3.6', '/root/bks-backend/env/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6', '/root/bks-backend/env/lib/python3.6/site-packages', '/root/bks-backend']
10Server time: Р§С‚, 29 РќРѕСР2018 17:56:53 +0000
11Installed Applications:
12['django.contrib.admin',
13 'django.contrib.auth',
14 'django.contrib.contenttypes',
15 'django.contrib.sessions',
16 'django.contrib.messages',
17 'django.contrib.staticfiles',
18 'drf_yasg',
19 'nested_admin',
20 'rest_framework',
21 'rest_framework.authtoken',
22 'django_filters',
23 'corsheaders',
24 'ckeditor',
25 'ckeditor_uploader',
26 'Auth.apps.AuthConfig',
27 'Client.apps.ClientConfig',
28 'ClientProfile.apps.ClientProfileConfig',
29 'ClientGoal.apps.ClientGoalConfig',
30 'ClientInvestProfile.apps.ClientInvestProfileConfig',
31 'Courses.apps.CoursesConfig',
32 'News.apps.NewsConfig',
33 'TemplateDoc.apps.TemplateDocConfig',
34 'FinanceProduct.apps.FinanceProductConfig',
35 'Portfolio.apps.PortfolioConfig',
36 'Payout.apps.PayoutConfig']
37Installed Middleware:
38['django.middleware.security.SecurityMiddleware',
39 'django.contrib.sessions.middleware.SessionMiddleware',
40 'django.middleware.common.CommonMiddleware',
41 'django.middleware.csrf.CsrfViewMiddleware',
42 'django.contrib.auth.middleware.AuthenticationMiddleware',
43 'django.contrib.messages.middleware.MessageMiddleware',
44 'django.middleware.clickjacking.XFrameOptionsMiddleware',
45 'corsheaders.middleware.CorsMiddleware',
46 'django.middleware.common.CommonMiddleware']
47
48
49Traceback:
50
51File "/root/bks-backend/env/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
52 34. response = get_response(request)
53
54File "/root/bks-backend/env/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
55 126. response = self.process_exception_by_middleware(e, request)
56
57File "/root/bks-backend/env/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
58 124. response = wrapped_callback(request, *callback_args, **callback_kwargs)
59
60File "/root/bks-backend/env/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
61 54. return view_func(*args, **kwargs)
62
63File "/root/bks-backend/env/lib/python3.6/site-packages/rest_framework/viewsets.py" in view
64 116. return self.dispatch(request, *args, **kwargs)
65
66File "/root/bks-backend/env/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
67 495. response = self.handle_exception(exc)
68
69File "/root/bks-backend/env/lib/python3.6/site-packages/rest_framework/views.py" in handle_exception
70 455. self.raise_uncaught_exception(exc)
71
72File "/root/bks-backend/env/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
73 492. response = handler(request, *args, **kwargs)
74
75File "/root/bks-backend/ClientInvestProfile/views.py" in complete
76 120. print('PayoutProduct product:', payout_product.product)
77
78File "/root/bks-backend/env/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py" in __get__
79 188. "%s has no %s." % (self.field.model.__name__, self.field.name)
80
81Exception Type: RelatedObjectDoesNotExist at /api/client/invest_recommendations/61/complete/
82Exception Value: PayoutProduct has no product.
83Request information:
84USER: picasel
85
86GET: No GET data
87
88POST: No POST data
89
90FILES: No FILES data
91
92COOKIES: No cookie data
93
94META:
95CONTENT_LENGTH = '115'
96CONTENT_TYPE = 'application/json'
97HTTP_ACCEPT = '*/*'
98HTTP_ACCEPT_ENCODING = 'gzip, deflate'
99HTTP_ACCEPT_LANGUAGE = 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7'
100HTTP_AUTHORIZATION = 'Token bce502eb8296278d1ca3056a69ce95507c516c94'
101HTTP_CONNECTION = 'close'
102HTTP_HOST = '176.113.83.31:8000'
103HTTP_ORIGIN = 'http://0.0.0.0:8080'
104HTTP_REFERER = 'http://0.0.0.0:8080/invest/83'
105HTTP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36'
106HTTP_X_FORWARDED_FOR = '146.185.136.157'
107HTTP_X_FORWARDED_PROTO = 'http'
108HTTP_X_REAL_IP = '146.185.136.157'
109PATH_INFO = '/api/client/invest_recommendations/61/complete/'
110QUERY_STRING = ''
111RAW_URI = '/api/client/invest_recommendations/61/complete/'
112REMOTE_ADDR = ''
113REQUEST_METHOD = 'POST'
114SCRIPT_NAME = ''
115SERVER_NAME = '176.113.83.31'
116SERVER_PORT = '8000'
117SERVER_PROTOCOL = 'HTTP/1.0'
118SERVER_SOFTWARE = 'gunicorn/19.9.0'
119gunicorn.socket = <socket.socket fd=9, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, laddr=/root/bks-backend/bks.sock>
120wsgi.errors = <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f84a6afea20>
121wsgi.file_wrapper = ''
122wsgi.input = <gunicorn.http.body.Body object at 0x7f84a6afe828>
123wsgi.multiprocess = True
124wsgi.multithread = False
125wsgi.run_once = False
126wsgi.url_scheme = 'http'
127wsgi.version = '(1, 0)'
128
129Settings:
130Using settings module bksproject.settings
131ABSOLUTE_URL_OVERRIDES = {}
132ADMINS = []
133ALLOWED_HOSTS = ['*']
134APPEND_SLASH = True
135AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
136AUTH_PASSWORD_VALIDATORS = '********************'
137AUTH_USER_MODEL = 'Auth.User'
138BASE_DIR = '/root/bks-backend'
139CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
140CACHE_MIDDLEWARE_ALIAS = 'default'
141CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
142CACHE_MIDDLEWARE_SECONDS = 600
143CKEDITOR_BASEPATH = '/static/ckeditor/ckeditor'
144CKEDITOR_CONFIGS = {'default': {'toolbar': [{'name': 'document', 'items': ['Source', '-', 'Preview', '-', 'Templates']}, {'name': 'clipboard', 'items': ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo']}, {'name': 'editing', 'items': ['Find', 'Replace', '-', 'SelectAll']}, {'name': 'tools', 'items': ['Maximize', 'ShowBlocks']}, {'name': 'basicstyles', 'items': ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat']}, {'name': 'paragraph', 'items': ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']}, {'name': 'links', 'items': ['Link', 'Unlink', 'Anchor']}, {'name': 'insert', 'items': ['Image', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak']}, {'name': 'styles', 'items': ['Format', 'FontSize', 'LineHeight']}], 'tabSpaces': 4, 'extraPlugins': 'uploadimage'}}
145CKEDITOR_UPLOAD_PATH = 'attachments/'
146CKEDITOR_UPLOAD_SLUGIFY_FILENAME = True
147CORS_ORIGIN_ALLOW_ALL = True
148CSRF_COOKIE_AGE = 31449600
149CSRF_COOKIE_DOMAIN = None
150CSRF_COOKIE_HTTPONLY = False
151CSRF_COOKIE_NAME = 'csrftoken'
152CSRF_COOKIE_PATH = '/'
153CSRF_COOKIE_SAMESITE = 'Lax'
154CSRF_COOKIE_SECURE = False
155CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
156CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
157CSRF_TRUSTED_ORIGINS = []
158CSRF_USE_SESSIONS = False
159DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': '/root/bks-backend/db.sqlite3', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'USER': '', 'PASSWORD': '********************', 'HOST': '', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
160DATABASE_ROUTERS = []
161DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
162DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
163DATETIME_FORMAT = 'N j, Y, P'
164DATETIME_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']
165DATE_FORMAT = 'N j, Y'
166DATE_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']
167DEBUG = True
168DEBUG_PROPAGATE_EXCEPTIONS = False
169DECIMAL_SEPARATOR = '.'
170DEFAULT_CHARSET = 'utf-8'
171DEFAULT_CONTENT_TYPE = 'text/html'
172DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
173DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
174DEFAULT_FROM_EMAIL = 'webmaster@localhost'
175DEFAULT_INDEX_TABLESPACE = ''
176DEFAULT_TABLESPACE = ''
177DISALLOWED_USER_AGENTS = []
178EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
179EMAIL_HOST = 'smtp.sendgrid.net'
180EMAIL_HOST_PASSWORD = '********************'
181EMAIL_HOST_USER = 'AnastasiaPicasel'
182EMAIL_PORT = 587
183EMAIL_SSL_CERTFILE = None
184EMAIL_SSL_KEYFILE = '********************'
185EMAIL_SUBJECT_PREFIX = '[Django] '
186EMAIL_TIMEOUT = None
187EMAIL_USE_LOCALTIME = False
188EMAIL_USE_SSL = False
189EMAIL_USE_TLS = True
190FILE_CHARSET = 'utf-8'
191FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
192FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
193FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
194FILE_UPLOAD_PERMISSIONS = None
195FILE_UPLOAD_TEMP_DIR = None
196FIRST_DAY_OF_WEEK = 0
197FIXTURE_DIRS = []
198FORCE_SCRIPT_NAME = None
199FORMAT_MODULE_PATH = None
200FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
201IGNORABLE_404_URLS = []
202INSTALLED_APPS = ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'drf_yasg', 'nested_admin', 'rest_framework', 'rest_framework.authtoken', 'django_filters', 'corsheaders', 'ckeditor', 'ckeditor_uploader', 'Auth.apps.AuthConfig', 'Client.apps.ClientConfig', 'ClientProfile.apps.ClientProfileConfig', 'ClientGoal.apps.ClientGoalConfig', 'ClientInvestProfile.apps.ClientInvestProfileConfig', 'Courses.apps.CoursesConfig', 'News.apps.NewsConfig', 'TemplateDoc.apps.TemplateDocConfig', 'FinanceProduct.apps.FinanceProductConfig', 'Portfolio.apps.PortfolioConfig', 'Payout.apps.PayoutConfig']
203INTERNAL_IPS = []
204LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian BokmГÒl'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')]
205LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
206LANGUAGE_CODE = 'ru-ru'
207LANGUAGE_COOKIE_AGE = None
208LANGUAGE_COOKIE_DOMAIN = None
209LANGUAGE_COOKIE_NAME = 'django_language'
210LANGUAGE_COOKIE_PATH = '/'
211LOCALE_PATHS = []
212LOGGING = {}
213LOGGING_CONFIG = 'logging.config.dictConfig'
214LOGIN_REDIRECT_URL = '/accounts/profile/'
215LOGIN_URL = '/accounts/login/'
216LOGOUT_REDIRECT_URL = None
217MAIN_EMAIL_ADDRESS = 'a.bilyalov@picasel.agency'
218MANAGERS = []
219MEDIA_ROOT = '/root/bks-backend/media'
220MEDIA_URL = '/media/'
221MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
222MIDDLEWARE = ['django.middleware.security.SecurityMiddleware', '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', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware']
223MIGRATION_MODULES = {}
224MONTH_DAY_FORMAT = 'F j'
225NUMBER_GROUPING = 0
226PASSWORD_HASHERS = '********************'
227PASSWORD_RESET_TIMEOUT_DAYS = '********************'
228PREPEND_WWW = False
229REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.TokenAuthentication'), 'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly',)}
230ROOT_URLCONF = 'bksproject.urls'
231SECONDS_IN_DAY = 86400
232SECRET_KEY = '********************'
233SECURE_BROWSER_XSS_FILTER = False
234SECURE_CONTENT_TYPE_NOSNIFF = False
235SECURE_HSTS_INCLUDE_SUBDOMAINS = False
236SECURE_HSTS_PRELOAD = False
237SECURE_HSTS_SECONDS = 0
238SECURE_PROXY_SSL_HEADER = None
239SECURE_REDIRECT_EXEMPT = []
240SECURE_SSL_HOST = None
241SECURE_SSL_REDIRECT = False
242SERVER_EMAIL = 'root@localhost'
243SESSION_CACHE_ALIAS = 'default'
244SESSION_COOKIE_AGE = 1209600
245SESSION_COOKIE_DOMAIN = None
246SESSION_COOKIE_HTTPONLY = True
247SESSION_COOKIE_NAME = 'sessionid'
248SESSION_COOKIE_PATH = '/'
249SESSION_COOKIE_SAMESITE = 'Lax'
250SESSION_COOKIE_SECURE = False
251SESSION_ENGINE = 'django.contrib.sessions.backends.db'
252SESSION_EXPIRE_AT_BROWSER_CLOSE = False
253SESSION_FILE_PATH = None
254SESSION_SAVE_EVERY_REQUEST = False
255SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
256SETTINGS_MODULE = 'bksproject.settings'
257SHORT_DATETIME_FORMAT = 'm/d/Y P'
258SHORT_DATE_FORMAT = 'm/d/Y'
259SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
260SILENCED_SYSTEM_CHECKS = []
261STATICFILES_DIRS = []
262STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
263STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
264STATIC_ROOT = '/root/bks-backend/static'
265STATIC_URL = '/static/'
266TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/root/bks-backend/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']}}]
267TEST_NON_SERIALIZED_APPS = []
268TEST_RUNNER = 'django.test.runner.DiscoverRunner'
269THOUSAND_SEPARATOR = ','
270TIME_FORMAT = 'P'
271TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
272TIME_ZONE = 'UTC'
273USE_I18N = True
274USE_L10N = True
275USE_THOUSAND_SEPARATOR = False
276USE_TZ = True
277USE_X_FORWARDED_HOST = False
278USE_X_FORWARDED_PORT = False
279WSGI_APPLICATION = 'bksproject.wsgi.application'
280X_FRAME_OPTIONS = 'SAMEORIGIN'
281YEAR_MONTH_FORMAT = 'F Y'
282
283
284You're seeing this error because you have DEBUG = True in your
285Django settings file. Change that to False, and Django will
286display a standard page generated by the handler for this status code.