app/django/core/management/commands/sqlsequencereset.py
author Lennard de Rijk <ljvderijk@gmail.com>
Sat, 24 Jan 2009 16:39:34 +0000
changeset 962 606871fda11c
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Added request creation and processing to role.py. This is used if you want to request to become a certain role for a group. For instance becoming a club member. The process request view will also be used to cancel outstanding invites might this be necessary. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed

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 connection, models
        return u'\n'.join(connection.ops.sequence_reset_sql(self.style, models.get_models(app))).encode('utf-8')