Performing a query returns an error

2019-11-13 Thread Patrick Carra
Hello all I am new to django and I am trying to do a query to that will provide me with information from multiple tables I have included my models.py file below: Enter code hclass Circuitinfotable(models.Model): pid = models.CharField(max_length=255, blank=True, null=True) circuitid = mod

Re: Performing a query returns an error

2019-11-13 Thread Simon Charette
Hello Patrick, >From what I understand you are relying on unmanaged (Meta.managed=False) models to use the ORM to query an externally managed database. The part you missed here is that the ORM maps ForeignKey fields to database columns with a "_id" suffix by default. In your case that means it

Re: Performing a query returns an error

2019-11-13 Thread Patrick Carra
Simon thank you for that I had been playing around with db_column but did not realize the exact reference I should have been making. Thank you for the quick reply! On Wednesday, November 13, 2019 at 9:46:59 AM UTC-6, Simon Charette wrote: > > Hello Patrick, > > From what I understand you are re