szabozoltan69

personnelDepl

Aug 30th, 2021 (edited)
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. curl http://localhost:8000/api/v2/deployment/aggregated?event=4130
  2. FieldError at /api/v2/deployment/aggregated
  3. Cannot resolve keyword 'personneldeployment' into field. Choices are: country_from, country_from_id, deployedperson_ptr, deployedperson_ptr_id, deployment, deployment_id, end_date, id, is_active, molnix_id, molnix_tags, name, role, role_ar, role_en, role_es, role_fr, start_date, type
  4.  
  5. Request Method: GET
  6. Request URL: http://localhost:8000/api/v2/deployment/aggregated?event=4130
  7. Django Version: 2.2.24
  8. Python Executable: /usr/local/bin/python
  9. Python Version: 3.6.11
  10. Python Path: ['/opt/project', '/opt/project', '/opt/.pycharm_helpers/pydev', '/opt/project', '/opt/.pycharm_helpers/pycharm_display', '/opt/.pycharm_helpers/third_party/thriftpy', '/opt/.pycharm_helpers/pydev', '/home/zol/.cache/JetBrains/PyCharm2021.2/cythonExtensions', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/site-packages', '/opt/.pycharm_helpers/pycharm_matplotlib_backend', '/usr/local/lib/python3.6/site-packages/IPython/extensions']
  11. Server time: Mon, 30 Aug 2021 12:33:01 +0000
  12. Installed Applications:
  13. ['modeltranslation',
  14.  'django.contrib.admin',
  15.  'django.contrib.auth',
  16.  'django.contrib.contenttypes',
  17.  'django.contrib.humanize',
  18.  'django.contrib.sessions',
  19.  'django.contrib.messages',
  20.  'django.contrib.staticfiles',
  21.  'django_admin_listfilter_dropdown',
  22.  'corsheaders',
  23.  'tastypie',
  24.  'rest_framework',
  25.  'rest_framework.authtoken',
  26.  'guardian',
  27.  'django_filters',
  28.  'graphene_django',
  29.  'api',
  30.  'per',
  31.  'notifications',
  32.  'registrations',
  33.  'deployments',
  34.  'databank',
  35.  'lang',
  36.  'tinymce',
  37.  'admin_auto_filters',
  38.  'django_celery_beat',
  39.  'reversion',
  40.  'reversion_compare',
  41.  'debug_toolbar',
  42.  'django.contrib.gis']
  43. Installed Middleware:
  44. ['debug_toolbar.middleware.DebugToolbarMiddleware',
  45.  'django.middleware.security.SecurityMiddleware',
  46.  'django.contrib.sessions.middleware.SessionMiddleware',
  47.  'corsheaders.middleware.CorsMiddleware',
  48.  'django.middleware.locale.LocaleMiddleware',
  49.  'django.middleware.common.CommonMiddleware',
  50.  'django.middleware.csrf.CsrfViewMiddleware',
  51.  'django.contrib.auth.middleware.AuthenticationMiddleware',
  52.  'django.contrib.messages.middleware.MessageMiddleware',
  53.  'django.middleware.clickjacking.XFrameOptionsMiddleware',
  54.  'middlewares.middlewares.RequestMiddleware',
  55.  'opencensus.ext.django.middleware.OpencensusMiddleware',
  56.  'opencensus.ext.django.middleware.OpencensusMiddleware']
  57.  
  58.  
  59. Traceback:
  60.  
  61. File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  62.   34.             response = get_response(request)
  63.  
  64. File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  65.   115.                 response = self.process_exception_by_middleware(e, request)
  66.  
  67. File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  68.   113.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
  69.  
  70. File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
  71.   54.         return view_func(*args, **kwargs)
  72.  
  73. File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py" in view
  74.   71.             return self.dispatch(request, *args, **kwargs)
  75.  
  76. File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
  77.   505.             response = self.handle_exception(exc)
  78.  
  79. File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in handle_exception
  80.   465.             self.raise_uncaught_exception(exc)
  81.  
  82. File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in raise_uncaught_exception
  83.   476.         raise exc
  84.  
  85. File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
  86.   502.             response = handler(request, *args, **kwargs)
  87.  
  88. File "/opt/project/deployments/drf_views.py" in get
  89.   166.             deployments_qset = deployments_qset.filter(personneldeployment__event_deployed_to=event_id)
  90.  
  91. File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in filter
  92.   892.         return self._filter_or_exclude(False, *args, **kwargs)
  93.  
  94. File "/usr/local/lib/python3.6/site-packages/modeltranslation/manager.py" in _filter_or_exclude
  95.   307.         return super(MultilingualQuerySet, self)._filter_or_exclude(negate, *args, **kwargs)
  96.  
  97. File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in _filter_or_exclude
  98.   910.             clone.query.add_q(Q(*args, **kwargs))
  99.  
  100. File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/query.py" in add_q
  101.   1290.         clause, _ = self._add_q(q_object, self.used_aliases)
  102.  
  103. File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/query.py" in _add_q
  104.   1318.                     split_subq=split_subq, simple_col=simple_col,
  105.  
  106. File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/query.py" in build_filter
  107.   1190.         lookups, parts, reffed_expression = self.solve_lookup_type(arg)
  108.  
  109. File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/query.py" in solve_lookup_type
  110.   1049.         _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
  111.  
  112. File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/query.py" in names_to_path
  113.   1420.                                      "Choices are: %s" % (name, ", ".join(available)))
  114.  
  115. Exception Type: FieldError at /api/v2/deployment/aggregated
  116. Exception Value: Cannot resolve keyword 'personneldeployment' into field. Choices are: country_from, country_from_id, deployedperson_ptr, deployedperson_ptr_id, deployment, deployment_id, end_date, id, is_active, molnix_id, molnix_tags, name, role, role_ar, role_en, role_es, role_fr, start_date, type
  117. Request information:
  118. USER: AnonymousUser
  119.  
  120. GET:
  121. event = '4130'
  122.  
  123. POST: No POST data
  124.  
  125. FILES: No FILES data
  126.  
  127. COOKIES: No cookie data
  128.  
  129. META:
  130. YEAR_MONTH_FORMAT = 'F Y'
  131. ...
  132.  
  133. You're seeing this error because you have DEBUG = True in your
  134. Django settings file. Change that to False, and Django will
  135. display a standard page generated by the handler for this status code.
  136.  
RAW Paste Data Copied