A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-August/081680.html below:

[Python-Dev] New to python, let me know if i should be posting somewhere else

[Python-Dev] New to python, let me know if i should be posting somewhere else [Python-Dev] New to python, let me know if i should be posting somewhere elsejamesz james.zhuo at gmail.com
Tue Aug 5 14:47:53 CEST 2008
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?
 
-- 
View this message in context: http://www.nabble.com/New-to-python%2C-let-me-know-if-i-should-be-posting-somewhere-else-tp18830344p18830344.html
Sent from the Python - python-dev mailing list archive at Nabble.com.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4