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 untrusted user: 00dani
GPG key ID: 8EB789DDF3ABD240

View file

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