fix get not stored content

This commit is contained in:
Silver Ghost 2022-11-07 12:38:42 +03:00
parent 75e4227944
commit 9904586ea0
No known key found for this signature in database

View File

@ -6,6 +6,7 @@ from django.conf import settings
from later42.libs.content import get_content, sanitize_img_size
from later42.models.article import Article
from later42.models.urls import URL
from later42.tasks import get_url_content_task
@login_required
@ -23,5 +24,6 @@ def get(request, url_id=None):
content['rich_content'] = sanitize_img_size(content['rich_content'])
except:
content = get_content(url.url)
get_url_content_task.delay(url.id)
context = {'url': url, 'content': content}
return render(request, 'reader.html', context)