Modify Chat UI
This commit is contained in:
parent
9f0213865d
commit
00113848c8
10 changed files with 1663 additions and 1572 deletions
|
@ -5,9 +5,10 @@ from django.db.models.query import QuerySet
|
|||
import hashlib
|
||||
|
||||
MAX_NUM_CHAR = 15
|
||||
NONE_RESULT = "__None__"
|
||||
|
||||
|
||||
def cache_wrapper(prefix, timeout=86400):
|
||||
def cache_wrapper(prefix, timeout=None):
|
||||
def arg_to_str(arg):
|
||||
if hasattr(arg, "id"):
|
||||
return str(arg.id)
|
||||
|
@ -31,8 +32,11 @@ def cache_wrapper(prefix, timeout=86400):
|
|||
cache_key = get_key(func, *args, **kwargs)
|
||||
result = cache.get(cache_key)
|
||||
if result is not None:
|
||||
if result == NONE_RESULT:
|
||||
result = None
|
||||
return result
|
||||
|
||||
if result is None:
|
||||
result = NONE_RESULT
|
||||
result = func(*args, **kwargs)
|
||||
cache.set(cache_key, result, timeout)
|
||||
return result
|
||||
|
|
|
@ -47,11 +47,6 @@ else:
|
|||
"pagedown-extra/Markdown.Extra.js",
|
||||
"pagedown_init.js",
|
||||
]
|
||||
css = {
|
||||
"all": [
|
||||
"markdown.css",
|
||||
]
|
||||
}
|
||||
|
||||
class AdminPagedownWidget(PagedownWidget, admin_widgets.AdminTextareaWidget):
|
||||
class Media:
|
||||
|
@ -60,7 +55,6 @@ else:
|
|||
"pagedown_widget.css",
|
||||
"content-description.css",
|
||||
"admin/css/pagedown.css",
|
||||
"markdown.css",
|
||||
"pagedown.css",
|
||||
]
|
||||
}
|
||||
|
@ -125,7 +119,6 @@ else:
|
|||
"pygment-github.css",
|
||||
"table.css",
|
||||
"ranks.css",
|
||||
"markdown.css",
|
||||
"dmmd-preview.css",
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue