Giter Site home page Giter Site logo

Comments (7)

coleifer avatar coleifer commented on August 16, 2024

That's odd that it breaks in that way. I'm not too familiar with the internals of dumpdata. The lines you referenced are using a somewhat internal API django has for adding fields to model classes. Since the User model is off-limits to external apps, I'm using the internal API to add a many-to-many field at runtime. Since the many-to-many data exists in its own table it doesn't affect the auth.User model except to add a nice api for querying relationships.

from django-relationships.

AliLozano avatar AliLozano commented on August 16, 2024

field = models.ManyToManyField(User, through=Relationship,
symmetrical=False, related_name='related_to')

That adds a new Field, many to many, i think dumdata find a Field ManyToMany and then, can't access to Relationship class, and broke all.. there are no way to delete the ManyToManyField, changing by other attribute that are not a Field?

from django-relationships.

ratpik avatar ratpik commented on August 16, 2024

I faced the same issue. Is there a way to do dumpdata/loaddata on the django auth user model without commenting out those lines?

from django-relationships.

epicserve avatar epicserve commented on August 16, 2024

Could this bug be related? https://code.djangoproject.com/ticket/14226

from django-relationships.

ratpik avatar ratpik commented on August 16, 2024

@epicserve Thanks for that. Looks like the same issue to me.

from django-relationships.

coleifer avatar coleifer commented on August 16, 2024

Good find, @epicserve 👏

from django-relationships.

coleifer avatar coleifer commented on August 16, 2024

Not sure the resolution here.

from django-relationships.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.