Git Product home page Git Product logo

Comments (2)

caligoig avatar caligoig commented on June 10, 2024

Hey @mureiken ,
I had the same error using Django 1.11, Python 3.6, restframework 3.8.2, running on Ubuntu 18.04
This is how I solved it, it is an ugly / dirty fix, I know, but at least I was able to have my code running.
In data_wizard package open serializers.py and to go line 27, find following lines

def to_representation(self, content_type_id):
        ct = ContentType.objects.get(pk=content_type_id)
        return '%s.%s' % (ct.app_label, ct.model)

and replace those with code below

def to_representation(self, content_type_id):
        if type(content_type_id) is int:
            ct = ContentType.objects.get(pk=content_type_id)
        else:
            ct = ContentType.objects.get(pk=content_type_id.pk)
        return '%s.%s' % (ct.app_label, ct.model)

I kept the name of input argument the same name in case function is being called elsewhere using the argument names. I know it is a dirty fix, but at least my application is working, hope it helps you

from django-data-wizard.

sheppard avatar sheppard commented on June 10, 2024

I fixed the implementation of the ContentTypeIdField so the workaround should no longer be needed. Thanks for reporting!

from django-data-wizard.

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.