fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
03b96b1
)
full urls in blog api
author
Jan Szejko
<janek37@gmail.com>
Tue, 21 Aug 2018 13:44:30 +0000
(15:44 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Tue, 21 Aug 2018 13:44:30 +0000
(15:44 +0200)
src/api/handlers.py
patch
|
blob
|
history
diff --git
a/src/api/handlers.py
b/src/api/handlers.py
index
af01337
..
0ace9a7
100644
(file)
--- a/
src/api/handlers.py
+++ b/
src/api/handlers.py
@@
-30,7
+30,7
@@
from wolnelektury.utils import re_escape
from . import emitters # Register our emitters
API_BASE = WL_BASE = MEDIA_BASE = lazy(
from . import emitters # Register our emitters
API_BASE = WL_BASE = MEDIA_BASE = lazy(
- lambda: u'http://' + Site.objects.get_current().domain, unicode)()
+ lambda: u'http
s
://' + Site.objects.get_current().domain, unicode)()
category_singular = {
category_singular = {
@@
-776,11
+776,11
@@
class BlogEntryHandler(BaseHandler):
@classmethod
def image_url(cls, entry):
@classmethod
def image_url(cls, entry):
- return
entry.image.url
if entry.image else None
+ return
(WL_BASE + entry.image.url)
if entry.image else None
@classmethod
def gallery_urls(cls, entry):
@classmethod
def gallery_urls(cls, entry):
- return [photo.url() for photo in entry.photo_set.all()]
+ return [
WL_BASE +
photo.url() for photo in entry.photo_set.all()]
@classmethod
def key(cls, entry):
@classmethod
def key(cls, entry):