1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- [INFO] [2022-10-05 19:38:38,957] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader
- [ERROR] [2022-10-05 19:41:59,059] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/group
- Traceback (most recent call last):
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
- response = get_response(request)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/utils/deprecation.py", line 116, in __call__
- response = self.process_request(request)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/middleware/common.py", line 54, in process_request
- path = self.get_full_path_with_slash(request)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/middleware/common.py", line 88, in get_full_path_with_slash
- raise RuntimeError(
- RuntimeError: You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to 127.0.0.1:8000/api/v1/group/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.
- [ERROR] [2022-10-05 19:41:59,060] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/group HTTP/1.1" 500 73447
- [WARNING] [2022-10-05 19:42:51,380] [log.py:224] [log:log_response] - Forbidden: /api/v1/group/
- [WARNING] [2022-10-05 19:42:51,381] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/group/ HTTP/1.1" 403 37
- [ERROR] [2022-10-05 19:42:58,516] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/login
- Traceback (most recent call last):
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
- response = get_response(request)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
- response = wrapped_callback(request, *callback_args, **callback_kwargs)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
- return view_func(*args, **kwargs)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
- return self.dispatch(request, *args, **kwargs)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
- response = self.handle_exception(exc)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
- self.raise_uncaught_exception(exc)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
- raise exc
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
- response = handler(request, *args, **kwargs)
- File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userlistview.py", line 125, in post
- 'group': user_obj.group,
- AttributeError: 'User' object has no attribute 'group'
- [ERROR] [2022-10-05 19:42:58,517] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/login HTTP/1.1" 500 94728
- [INFO] [2022-10-05 19:43:39,341] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userlistview.py changed, reloading.
- [INFO] [2022-10-05 19:43:39,639] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader
- [INFO] [2022-10-05 19:43:42,070] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/login HTTP/1.1" 200 292
- [ERROR] [2022-10-05 19:44:00,289] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/group/
- Traceback (most recent call last):
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
- response = get_response(request)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
- response = wrapped_callback(request, *callback_args, **callback_kwargs)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
- return view_func(*args, **kwargs)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
- return self.dispatch(request, *args, **kwargs)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
- response = self.handle_exception(exc)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
- self.raise_uncaught_exception(exc)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
- raise exc
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
- response = handler(request, *args, **kwargs)
- File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/middleware/rolecontrol.py", line 48, in __call__
- return self.func(request, *args, **kwargs)
- File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py", line 30, in post
- Group.objects.create(id=group_id, code=code, manager_id=manager_id, name=name, create_time=create_time,
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/query.py", line 451, in create
- obj = self.model(**kwargs)
- File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 503, in __init__
- raise TypeError("%s() got an unexpected keyword argument '%s'" % (cls.__name__, kwarg))
- TypeError: Group() got an unexpected keyword argument 'manager_id'
- [ERROR] [2022-10-05 19:44:00,293] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/group/ HTTP/1.1" 500 116471
- [INFO] [2022-10-05 19:44:55,486] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading.
- [INFO] [2022-10-05 19:44:55,710] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader
- [INFO] [2022-10-05 19:44:57,740] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/group/ HTTP/1.1" 200 12
- [INFO] [2022-10-06 09:58:00,351] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/urls.py changed, reloading.
|