Friday, June 26, 2015

Displaying Calculated and Modified field names in a Django Model?

I am creating reports in my MySQL backend. I have created a database view that only displays the fields I need: id, Position, Fault_Count. Postion and Fault_Count are modified field names from the Select statement. Django isn't liking this too much and keeps throwing an Operational Error (1054). Unknown Columns. 

How do I need to set up my model to display the modified fields: Fault_count doesn't exist in the original table because it's calculated and Position is a modified name of another field that also has some parameters set to it to find a character position.

Any ideas of what Django is expecting?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6ee17c81-36c2-4fce-98de-8861443c2f47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment