[notebook] Installing notebook examples gives error
import logging
import os
import pwd
+import sys
from django.core import management
from django.core.management.base import BaseCommand
@@ -46,6 +47,9 @@ class Command(BaseCommand):
sample_user = install_sample_user()
with transaction.atomic():
+ if sys.version_info[0] > 2:
+ management.call_command('loaddata', 'initial_notebook_examples.json', verbosity=2)
+ else:
management.call_command('loaddata', 'initial_notebook_examples.json', verbosity=2, commit=False)
Document.objects.sync()
