linkding/bookmarks/views/api.py
Sascha Ißbrücker e07da529f1 Preview website title + description in bookmark form
Fix unnecessary selects when rendering bookmarks
2019-07-02 01:28:02 +02:00

10 lines
248 B
Python

from django.http import JsonResponse
from services.website_loader import load_website_metadata
def website_metadata(request):
url = request.GET.get('url')
metadata = load_website_metadata(url)
return JsonResponse(metadata.to_dict())