Change how slugs are generated in dummy data
This commit is contained in:
parent
7a5d0b90db
commit
1792fe9bf1
|
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
import random
|
||||
import shutil
|
||||
from uuid import uuid1
|
||||
|
||||
import wagtail_factories
|
||||
from django.conf import settings
|
||||
|
|
@ -108,7 +109,7 @@ class Command(BaseCommand):
|
|||
|
||||
for content_block_idx, content_block_data in enumerate(content_blocks_data):
|
||||
# ContentBlockFactory.create(parent=chapter, **self.filter_data(content_block_data, 'contents'))
|
||||
ContentBlockFactory.create(parent=chapter, module=module, **content_block_data)
|
||||
ContentBlockFactory.create(parent=chapter, module=module, slug=f'{uuid1()}', **content_block_data)
|
||||
|
||||
# now create all and rooms
|
||||
management.call_command('dummy_rooms', verbosity=0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue