Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
keystroke_dynamic_software_django/keystroke_dynamic_software-10690462/core/management/commands/seed.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
37 lines (34 sloc)
1.47 KB
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.management.base import BaseCommand, CommandError | |
from core.models import Pangram | |
PANGRAMS = [ | |
"The quick brown fox jumps over a lazy dog", | |
"Show mangled quartz flip vibe exactly", | |
"Pack my box with five dozen liquor jugs", | |
"Jumpy halfling dwarves pick quartz box", | |
"Vex quest wizard, judge my backflop hand", | |
"The jay, pig, fox, zebra and my wolves quack", | |
"Quest judge wizard bonks foxy chimp love", | |
"Fix problem quickly with galvanized jets", | |
"Heavy boxes perform quick waltzes and jigs", | |
"A wizard's job is to vex chumps quickly in fog", | |
"When zombies arrive, quickly fax judge Pat", | |
"Pack my red box with five dozen quality jugs", | |
"Blewjs computer quiz favored proxy hacking", | |
"Who packed five dozen old quart jugs in my box", | |
"Both fickle dwarves jinx my pig quiz", | |
"Fat hag dwarves quickly zap jinx mob", | |
"Fox dwarves chop my talking quiz job", | |
"Public junk dwarves quiz mighty fox", | |
"How quickly daft jumping zebras vex", | |
"Two driven jocks help fax my big quiz", | |
"Go, lazy fat vixen, be shrewd, jump quick", | |
"Big dwarves heckle my top quiz of jinx", | |
"Public junk dwarves hug my quartz fox", | |
"Five jumping wizards hex bolty quick", | |
"Five hexing wizard bots jump quickly", | |
] | |
class Command(BaseCommand): | |
help = "Seed pangram to the database" | |
def handle(self, *args, **options): | |
for statement in PANGRAMS: | |
Pangram.objects.create(statement=statement.lower()) |