~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to django/core/management/commands/flush.py

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-10-12 11:34:35 UTC
  • mfrom: (1.1.12 upstream) (29.1.1 maverick-security)
  • Revision ID: james.westby@ubuntu.com-20101012113435-yy57c8tx6g9anf3e
Tags: 1.2.3-1ubuntu0.1
* SECURITY UPDATE: XSS in CSRF protections. New upstream release
  - CVE-2010-3082
* debian/patches/01_disable_url_verify_regression_tests.diff:
  - updated to disable another test that fails without internet connection
  - patch based on work by Kai Kasurinen and Krzysztof Klimonda
* debian/control: don't Build-Depends on locales-all, which doesn't exist
  in maverick

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from optparse import make_option
2
2
 
3
3
from django.conf import settings
4
 
from django.db import connections, transaction, models, DEFAULT_DB_ALIAS
 
4
from django.db import connections, router, transaction, models, DEFAULT_DB_ALIAS
5
5
from django.core.management import call_command
6
6
from django.core.management.base import NoArgsCommand, CommandError
7
7
from django.core.management.color import no_style
66
66
            # Emit the post sync signal. This allows individual
67
67
            # applications to respond as if the database had been
68
68
            # sync'd from scratch.
69
 
            emit_post_sync_signal(models.get_models(), verbosity, interactive, db)
 
69
            all_models = []
 
70
            for app in models.get_apps():
 
71
                all_models.extend([
 
72
                    m for m in models.get_models(app, include_auto_created=True)
 
73
                    if router.allow_syncdb(db, m)
 
74
                ])
 
75
            emit_post_sync_signal(all_models, verbosity, interactive, db)
70
76
 
71
77
            # Reinstall the initial_data fixture.
72
78
            kwargs = options.copy()