Thanks Gaetan, but the same error is thrown.
> Try:
> SubDivision.join('division')...
>
> Notice the lowercase "j". 'division' is the name of the relation, not
> the name of the class.
>
records =
SubDivision.join('division').select(order_by=Division.c.division_id).execute()
AttributeError: type object 'SubDivision' has no attribute 'join'
It almost seems like I'm missing an import but not sure which one.
This is the imports from model.py:
from datetime import datetime
from sqlalchemy import *
from elixir import *
from turbogears.database import metadata, session
from sqlalchemy.ext.assignmapper import assign_mapper
The entire traceback looks like this:
500 Internal error
The server encountered an unexpected condition which prevented it from
fulfilling the request.
Page handler: <bound method SubDivisionController.list of
<ycwuawaterdepartment.SubDivisionController.controllers.SubDivisionController
object at 0x88e240c>>
Traceback (most recent call last):
File "/var/lib/python-support/python2.4/cherrypy/_cphttptools.py",
line 105, in _run
self.main()
File "/var/lib/python-support/python2.4/cherrypy/_cphttptools.py",
line 254, in main
body = page_handler(*virtual_path, **self.params)
File "<string>", line 3, in list
File "/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/
turbogears/controllers.py", line 334, in expose
output = database.run_with_transaction(
File "<string>", line 5, in run_with_transaction
File "/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/
turbogears/database.py", line 354, in sa_rwt
retval = dispatch_exception(e,args,kw)
File "/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/
turbogears/database.py", line 343, in sa_rwt
retval = func(*args, **kw)
File "<string>", line 5, in _expose
File "/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/
turbogears/controllers.py", line 351, in <lambda>
mapping, fragment, args, kw)))
File "/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/
turbogears/controllers.py", line 378, in _execute_func
output = errorhandling.try_call(func, *args, **kw)
File "/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/
turbogears/errorhandling.py", line 73, in try_call
return func(self, *args, **kw)
File "<string>", line 3, in list
File "/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/
turbogears/paginate.py", line 49, in decorated
output = func(*args, **kw)
File "/home/mirizarry/mirizarry/YCWUA-WaterDepartment/
ycwuawaterdepartment/SubDivisionController/controllers.py", line 55,
in list
records =
SubDivision.join('division').select(order_by=Division.c.division_id).execute()
AttributeError: type object 'SubDivision' has no attribute 'join'
Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---