Created
August 10, 2016 23:16
-
-
Save zakariaboualaid/fc5c79c21928ae26a53ed9c5701f9451 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core import management | |
from django.core.management.base import BaseCommand | |
import os | |
import test_data | |
class Command(BaseCommand): | |
args = 'Arguments email and is paginated needed' | |
help = 'Django populate DB with test data.' | |
def handle(self, *args, **options): | |
if os.environ.get('DJANGO_ENV') != "production": | |
management.call_command('reset_db', interactive=False) | |
management.call_command('migrate', '--no-input') | |
test_data.load_test_data() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment