该视频本人观看信息bug
This commit is contained in:
parent
c6ac2434e8
commit
91b7e692ed
|
@ -81,7 +81,7 @@ class MyViewRecordAPIView(APIView):
|
|||
video = Video.objects.get(pk=id)
|
||||
except:
|
||||
return Response('视频不存在', status=HTTP_400_BAD_REQUEST)
|
||||
record = ViewRecord.objects.get_or_create(video=video, user=request.user, defaults={'video':video, 'user':request.user})
|
||||
record, _ = ViewRecord.objects.get_or_create(video=video, user=request.user, defaults={'video':video, 'user':request.user})
|
||||
serializer = VRecordSerializer(instance=record)
|
||||
return Response(serializer.data)
|
||||
|
||||
|
|
|
@ -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