Coder Social home page Coder Social logo

django-joinfield's People

Contributors

martsberger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dmitrytsatsarin

django-joinfield's Issues

Question about multiple database connection

Does this library work with data models from two different database?

The data models in my situation has a table in Database A and a look up table in Database B. I am trying to left join the table to its look up table. Since the two are from different database, will this library work?

Unable to create reverse relationship

First of all thank you for making the solution open source. I am using it in my project but am stuck with reverse relationship.
Here are my models

class Collections(models.Model):
id = models.BigAutoField(primary_key=True)
name = models.CharField(max_length=200)
description = models.CharField(max_length=2000)
....

class Meta:
db_table = 'collections'

class CollectionViews(models.Model):
id = models.BigAutoField(primary_key=True)
collection_id = JoinField(Collections,on_delete=models.DO_NOTHING,db_column='collection_id',to_field='id')

page = models.CharField(max_length=100)
....

class Meta:
db_table = 'collection_views'`

Am able to do forward filters, but backward relationship fails this is my code for reverse relationship

Collections.objects.filter(collection_views__page="listing")

also tried with actual model name

Collections.objects.filter(collectionviews_page='listing')

I receive this error

Cannot resolve keyword 'collectionviews' into field. Choices are: name, description......

It tries to find the collectionviews in the field list but its a model.

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.