1

I am looking for help, Using Django1.5/Python2.7.3.

I have two applications A and B. A equals B, the only difference is the ID, but the titles and slug are equal.

I wonder if can with "loaddata" import A> B and B> A,

Example:
python manage.py dumpdata myapp.A > a.json

Here loadata myapp.B
python manage.py loaddata a.json

The idea is to insert content that has no "B", but if it contains "A", my problem its pk.

Any suggestions.

*Update***

Finally fix it by serializing keys (pk) with natural keys. Django serializers natural keys

Thanks.

Soy Latam
  • 182
  • 1
  • 2
  • 10
  • 1
    * I can use Natural keys? – Soy Latam Apr 10 '13 at 20:17
  • You'll find Django's implementation of natural keys is not complete. The top level reocrds will still have a real pk value, not a natural key, making it impossible to load everything in cleanly. This may have changed in the development version, but as of Django 1.5, it's still very difficult to use the way you're describing. – Cerin Nov 14 '13 at 19:10

0 Answers0