#24558: django-admin.py dumpdata should be deterministic for VCS and diff
friendliness
-------------------------------------+-------------------------------------
     Reporter:  gfairchild           |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Core (Management     |                  Version:  1.7
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by gfairchild):

 Sure, so here's an example model I have in my `swap` app:

 {{{
 class Term(models.Model):
     term = models.CharField(max_length=255)
     definition = models.TextField()
     reference = models.TextField()
 }}}

 I've attached the output from two consecutive dumps (`./manage.py dumpdata
 swap.Term`).

 You can see that the content of each file is identical. And as you say,
 the objects are indeed sorted by their primary key. The ordering issue is
 with the key-value pairs printed for each object. Each object is just a
 dictionary of keys and values, so there's no ordering maintained.

--
Ticket URL: <https://code.djangoproject.com/ticket/24558#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.d7646789ca2a4f0f4362dbdc523c39af%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to