Save any provided syndications for a new entry when creating it

This commit is contained in:
Danielle McLean 2018-06-28 21:07:24 +10:00
parent 556329d5fa
commit c8e0b9c5fb
Signed by: 00dani
GPG Key ID: 8EB789DDF3ABD240
1 changed files with 3 additions and 0 deletions

View File

@ -71,6 +71,9 @@ def create(request):
entry.cats.set(cats)
entry.save()
for url in props.get('syndication', []):
entry.syndications.create(url=url)
base = utils.origin(request)
perma = urljoin(base, entry.url)
short = urljoin(base, entry.short_url)