Changeset 9057 for src/django_gheat/gheat/management/commands
- Timestamp:
- Apr 15, 2011, 9:27:48 PM (14 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/management/commands/add_random_points.py
r9056 r9057 4 4 # 5 5 # Rick van der Zwet <info@rickvanderzwet.nl> 6 import settings7 from django.core.management import setup_environ8 setup_environ(settings)9 10 11 6 from django.db import connection, transaction 7 from django.core.management.base import BaseCommand 12 8 from gheat.models import * 9 from optparse import OptionParser, make_option 13 10 import datetime 14 11 import os … … 52 49 53 50 51 class Command(BaseCommand): 52 option_list = BaseCommand.option_list + ( 53 make_option("-c", "--count", dest="count", type="int", default=100, help="Number of points to add"), 54 ) 55 56 def handle(self, *args, **options): 57 add_random_measurements(options['count']) 58 54 59 if __name__ == "__main__": 55 60 # Awefull hack for argument parsing
Note:
See TracChangeset
for help on using the changeset viewer.