Making the script less noisy here I commented out the actual work.
(So it didn't function as a test.) 
(No comment. 😐)

Corrected version:

```
import sys

from django.db import connection
from django.db.migrations.loader import MigrationLoader

loader = MigrationLoader(connection)

backwards = loader.graph.root_nodes()
forwards = loader.graph.leaf_nodes()

print('Calculating backward plans:')
for root in backwards:
    loader = MigrationLoader(connection)
    sys.stdout.write('.')
    plan = loader.graph.backwards_plan(root)
    #print(plan)
sys.stdout.write('\n')
print('Calculating forward plans:')
for leaf in forwards:
    loader = MigrationLoader(connection)
    sys.stdout.write('.')
    plan = loader.graph.forwards_plan(leaf)
    # print(plan)

sys.stdout.write('\nRun Done\n\n')

```

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/981a90ea-fa4a-4c6f-8e78-198d5a3751a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to