Giter Club home page Giter Club logo

Comments (6)

Deepwalker avatar Deepwalker commented on September 25, 2024

Ok, will take a look.

from aldjemy.

kipanshi avatar kipanshi commented on September 25, 2024

Hi Eric,

I cannot reproduce it on the test project with Django 1.4, I used the models described below.
(note, that I omitted "models" in string specifying the related model, following the Django docs https://docs.djangoproject.com/en/1.4/ref/models/fields/#lazy-relationships)

In test_project/sample/models.py:

from django.db import models
class Chapter(models.Model):
    title = models.CharField(max_length=200)
    book = models.ForeignKey('Book')
class Book(models.Model):
    title = models.CharField(max_length=200)
class Author(models.Model):
    name = models.CharField(max_length=200)
    biography = models.TextField()
    books = models.ManyToManyField(Book, related_name='books')
class StaffAuthor(Author):
    role = models.TextField()
class Review(models.Model):
    book = models.ForeignKey('a_sample.BookProxy')

In test_project/a_sample/models.py:

from sample.models import Book
class BookProxy(Book):
    class Meta:
        proxy = True

from aldjemy.

kipanshi avatar kipanshi commented on September 25, 2024

I guess the problem is due you're having circular import occurring and this make aldjemy fail. I've experienced such kind of an error and figured out that the circular import was the cause.

from aldjemy.

kipanshi avatar kipanshi commented on September 25, 2024

See updated test project #9

from aldjemy.

Deepwalker avatar Deepwalker commented on September 25, 2024

Erik, can you comment? If problem in 'models' string, then we will close this ticket. Let me know if Kirill's comment solved you issue.

from aldjemy.

erikcw avatar erikcw commented on September 25, 2024

Sorry about not responding sooner. I was filing another ticket and noticed this one.

When I remove "models" from the string, it seems to work.

class UserProfile(models.Model): 
   ...
    stripe_customer = models.ForeignKey('zebra.Customer')

This ticket can be closed.

from aldjemy.

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.