#修改
This commit is contained in:
parent
ec028bf23b
commit
694a011de1
|
@ -1698,7 +1698,9 @@ def news_management_update(request,pk):
|
||||||
image = request.FILES.get('image')
|
image = request.FILES.get('image')
|
||||||
if request.POST.get('date'):
|
if request.POST.get('date'):
|
||||||
date = request.POST.get('date')
|
date = request.POST.get('date')
|
||||||
News.objects.filter(id=pk).update(type=t, title=title, author=author, date=date, content=content, source=source, image=image)
|
News.objects.filter(id=pk).update(type=t, title=title, author=author, date=date, content=content, source=source)
|
||||||
|
news.image = image
|
||||||
|
news.save()
|
||||||
else:
|
else:
|
||||||
News.objects.filter(id=pk).update(type=t, title=title, author=author, content=content,
|
News.objects.filter(id=pk).update(type=t, title=title, author=author, content=content,
|
||||||
source=source, image=image)
|
source=source, image=image)
|
||||||
|
|
Loading…
Reference in New Issue