diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-08-16 06:06:55 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-08-16 06:06:55 +0000 |
| commit | 01adbb55e6698b512ff202bc5fc81f9565e4003b (patch) | |
| tree | 9b9ab3f9fa4461665ff81546c840054a34c50d16 /django/core/management/commands/sqlsequencereset.py | |
| parent | 7f06e44f9959fd8c0db58162d4bd5feb383db8f1 (diff) | |
Major refactoring of django.core.management -- it's now a package rather than a 1730-line single module. All django-admin/manage.py commands are now stored in separate modules. This is backwards-incompatible for people who used django.core.management functions directly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/management/commands/sqlsequencereset.py')
| -rw-r--r-- | django/core/management/commands/sqlsequencereset.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/django/core/management/commands/sqlsequencereset.py b/django/core/management/commands/sqlsequencereset.py new file mode 100644 index 0000000000..8ed2fbaf97 --- /dev/null +++ b/django/core/management/commands/sqlsequencereset.py @@ -0,0 +1,9 @@ +from django.core.management.base import AppCommand + +class Command(AppCommand): + help = 'Prints the SQL statements for resetting sequences for the given app name(s).' + output_transaction = True + + def handle_app(self, app, **options): + from django.db import backend, models + return '\n'.join(backend.get_sql_sequence_reset(self.style, models.get_models(app))) |
