parent
999628f989
commit
de6fc02509
2 changed files with 12 additions and 10 deletions
|
|
@ -1001,26 +1001,28 @@ li.footer-child-item {
|
|||
.blog-text h6 {
|
||||
margin-top: 3em;
|
||||
margin-bottom: 1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.blog-list-content {
|
||||
border: 0px;
|
||||
background: transparent;
|
||||
}
|
||||
.blog-list-item {
|
||||
padding-top: 60px;
|
||||
padding-bottom: 60px;
|
||||
padding-top: 4em;
|
||||
padding-bottom: 4em;
|
||||
}
|
||||
.blogpost-cover-img {
|
||||
width: 75%;
|
||||
}
|
||||
.blog-list-item .avatar {
|
||||
margin-right: 15px;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.blog-list-item .blog-header {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.blog-header {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
.blog-comments {
|
||||
position: relative;
|
||||
|
|
|
|||
|
|
@ -106,26 +106,26 @@ def json_handler(obj):
|
|||
# serialize date
|
||||
import collections
|
||||
|
||||
if isinstance(obj, (datetime.date, datetime.timedelta, datetime.datetime)):
|
||||
if isinstance(obj, (datetime.date, datetime.timedelta, datetime.datetime)):
|
||||
return text_type(obj)
|
||||
|
||||
if isinstance(obj, Decimal):
|
||||
if isinstance(obj, Decimal):
|
||||
return text_type(obj)
|
||||
|
||||
elif isinstance(obj, LocalProxy):
|
||||
elif isinstance(obj, LocalProxy):
|
||||
return text_type(obj)
|
||||
|
||||
elif isinstance(obj, frappe.model.document.BaseDocument):
|
||||
elif isinstance(obj, frappe.model.document.BaseDocument):
|
||||
doc = obj.as_dict(no_nulls=True)
|
||||
return doc
|
||||
|
||||
elif isinstance(obj, collections.Iterable):
|
||||
elif isinstance(obj, collections.Iterable):
|
||||
return list(obj)
|
||||
|
||||
elif type(obj)==type or isinstance(obj, Exception):
|
||||
elif type(obj)==type or isinstance(obj, Exception):
|
||||
return repr(obj)
|
||||
|
||||
else:
|
||||
else:
|
||||
raise TypeError("""Object of type %s with value of %s is not JSON serializable""" % \
|
||||
(type(obj), repr(obj)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue