Initial commit
This commit is contained in:
0
djangoldp_example/management/__init__.py
Normal file
0
djangoldp_example/management/__init__.py
Normal file
0
djangoldp_example/management/commands/__init__.py
Normal file
0
djangoldp_example/management/commands/__init__.py
Normal file
12
djangoldp_example/management/commands/mock_example.py
Normal file
12
djangoldp_example/management/commands/mock_example.py
Normal file
@ -0,0 +1,12 @@
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from djangoldp_example.factories import ExampleFactory
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Mock data'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--size', type=int, default=0, help='Number of example to create')
|
||||
|
||||
def handle(self, *args, **options):
|
||||
ExampleFactory.create_batch(options['size'], thread=thread)
|
||||
self.stdout.write(self.style.SUCCESS('Successful data mock install'))
|
Reference in New Issue
Block a user