jamesz wrote:
Hi,

I am new to Python, so this question that is probably blindingly obvious to
you all.
If I have 2 classes that references each other (a circular reference of some
sort) and both class are defined in the single file in the order shown.
class Resume(db.Model):
        file_data = db.BlobProperty()
        candidate = db.ReferenceProperty(Candidate)

class Candidate(db.Model):
        first_name = db.StringProperty()
        last_name = db.StringProperty()
        latest_resume = db.ReferenceProperty(Resume)

the Resume class does not know about the Candidate class as this module is imported, so it throws a error. Is there any way to get around
this problem?
Jamesz:

This list (python-dev) is for the development *of* Python, not development *with* Python. If you ask your question on comp.lang.python ([EMAIL PROTECTED]) you will almost certainly receive an answer.

regards
 Steve
--
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to