一个bug
This commit is contained in:
parent
302273ad91
commit
69429a360c
|
|
@ -28,7 +28,7 @@ class RecordMixin():
|
|||
`request.user` or `request.auth` is accessed.
|
||||
"""
|
||||
if request.user and request.method == 'GET' and request.user.username != 'admin':
|
||||
QueryRecord.objects.create(user=user,path=request.path,ip=request.META.get('HTTP_X_FORWARDED_FOR'),method=\
|
||||
QueryRecord.objects.create(user=request.user,path=request.path,ip=request.META.get('HTTP_X_FORWARDED_FOR'),method=\
|
||||
request.method,search=request.query_params.get('search',None),query=request.query_params)
|
||||
|
||||
class QueryRecordListViewSet(ListModelMixin, GenericViewSet):
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
from .settings import *
|
||||
DEBUG = True
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': 'cma',
|
||||
'USER': 'postgres',
|
||||
'PASSWORD': 'zctest1234',
|
||||
'HOST': '47.95.0.242',
|
||||
'PORT': '5432',
|
||||
}
|
||||
# 'default': {
|
||||
# 'ENGINE': 'django.db.backends.postgresql',
|
||||
# 'NAME': 'cma',
|
||||
# 'USER': 'cma',
|
||||
# 'PASSWORD': 'cma123',
|
||||
# 'HOST': '172.16.80.102',
|
||||
# 'USER': 'postgres',
|
||||
# 'PASSWORD': 'zctest1234',
|
||||
# 'HOST': '47.95.0.242',
|
||||
# 'PORT': '5432',
|
||||
# }
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': 'cma',
|
||||
'USER': 'cma',
|
||||
'PASSWORD': 'cma123',
|
||||
'HOST': '172.16.80.102',
|
||||
'PORT': '5432',
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue