Rambling about Django, Python, Ansible and sometimes PHP and Wordpress. I enjoy talking about all technologies, and offer help when I can.

Friday, July 17, 2009

Class definition order between two related classes

I ran into an issue where I wanted to have a foreign key to one class then over ride the save in the other class to update the current class. It would through and error because one of the classes was not defined. I finally found this post Class definition order between two related classes and see that you can but the models name in quotes in the foreign key.
example: