Either that or your forgot to import at the top of your controller.py

something similar to:

from model import hub, Page

You'll need to do that for each object.  For example, if I had the
objects Page, Comment and User in my model.py I would put:

from model import hub, Page, Comment, User

Regards,

Lee

On 14/10/05, Fabian Neumann <[EMAIL PROTECTED]> wrote:
>
> Art wrote:
> > I'm having some problems with to sqlite.
> > I installed pysqlite2.0.4 for python 2.4 and I'm running sqlite2.8.16.
> > on Windows.
> > The problems is below:
> >
> >>> H:\TurboGears\wiki20>turbogears-admin.py sql create
> >>> Using database URI sqlite:///turbogears/wiki20/wiki.db
> >>> No classes found!
> >>> Looked in modules: wiki20.model
> >>> No packages specified
> >>> No eggs specified
>
> Looks like you forgot to actually create a model.
>
> >>>> Page(pagename="FrontPage", data="some data")
> > Traceback (most recent call last):
> >   File "<console>", line 1, in ?
> > NameError: name 'Page' is not defined
>
> To make this successful, your model.py should a least contain something
> like this:
>
> ================================================
> from sqlobject import *
> from turbogears.database import PackageHub
>
> hub = PackageHub("wiki20")
> __connection__ = hub
>
> class Page(SQLObject):
>     pagename = StringCol(length=255, alternateID=True)
>     data = StringCol()
> ================================================
>
> Fabian
>
>

Reply via email to