|
|
@@ -53,12 +53,20 @@ def notebooks(request):
|
|
|
if USE_NEW_EDITOR.get():
|
|
|
notebooks = [doc.to_dict() for doc in Document2.objects.documents(user=request.user).search_documents(types=['query-%s' % editor_type])]
|
|
|
else:
|
|
|
- notebooks = [d.content_object.to_dict() for d in Document.objects.get_docs(request.user, Document2, qfilter=Q(extra__startswith='query')) if not d.content_object.is_history and d.content_object.type == 'query-' + editor_type]
|
|
|
+ notebooks = [
|
|
|
+ d.content_object.to_dict()
|
|
|
+ for d in Document.objects.get_docs(request.user, Document2, qfilter=Q(extra__startswith='query'))
|
|
|
+ if not d.content_object.is_history and d.content_object.type == 'query-' + editor_type
|
|
|
+ ]
|
|
|
else:
|
|
|
if USE_NEW_EDITOR.get():
|
|
|
notebooks = [doc.to_dict() for doc in Document2.objects.documents(user=request.user).search_documents(types=['notebook'])]
|
|
|
else:
|
|
|
- notebooks = [d.content_object.to_dict() for d in Document.objects.get_docs(request.user, Document2, qfilter=Q(extra='notebook')) if not d.content_object.is_history]
|
|
|
+ notebooks = [
|
|
|
+ d.content_object.to_dict()
|
|
|
+ for d in Document.objects.get_docs(request.user, Document2, qfilter=Q(extra='notebook'))
|
|
|
+ if not d.content_object.is_history
|
|
|
+ ]
|
|
|
|
|
|
return render('notebooks.mako', request, {
|
|
|
'notebooks_json': json.dumps(notebooks, cls=JSONEncoderForHTML),
|
|
|
@@ -181,7 +189,6 @@ def browse(request, database, table, partition_spec=None):
|
|
|
namespace=namespace,
|
|
|
compute=compute
|
|
|
)
|
|
|
-
|
|
|
return render('editor.mako', request, {
|
|
|
'notebooks_json': json.dumps([editor.get_data()]),
|
|
|
'options_json': json.dumps({
|