My model is fairly simple.  If anybody is willing to help, it'd be
much appreciated:

from datetime import datetime
from turbogears.database import PackageHub
from sqlobject import *
from turbogears import identity

hub = PackageHub("themasses")
__connection__ = hub

class character(SQLObject):
    charactername = StringCol(length=255,title="first and last name of
character",alternateID=True,unique=True,notNone=True)
    infected = BoolCol(title="is this character
infected?",default="False")
    location = ForeignKey("landblock")
    description = StringCol(length=255,title="character
description",default="a nondescript character",notNone=True)
    items = MultipleJoin("item",joinColumn='itemname_id')


class item(SQLObject):
    itemname = StringCol(length=255,title="name of the
item",alternateID=True,unique=True,notNone=True)
    weight = IntCol(title="item weight",default=0,notNone=True)
    description = StringCol(length=255,title="item
description",default="a nondescript item",notNone=True)


class container(SQLObject):
    containername = StringCol(length=255,title="type of
container",alternateID=True,unique=True,notNone=True)
    storagesize = IntCol(title="amount of storage spaces
available",default=1,notNone=True)
    items = ForeignKey("item")
    building = MultipleJoin("building",joinColumn='containers_id')


class room(SQLObject):
    roomname = StringCol(length=255,title="name of the
room",alternateID=True,default="room",unique=True,notNone=True)
    description = StringCol(length=255,title="room
description",default="a nondescript room",notNone=True)


class landblock(SQLObject):
    characters = MultipleJoin("character",joinColumn='location_id')
    Region = ForeignKey("region")
    buildings = ForeignKey("building")


class building(SQLObject):
    buildingtype = StringCol(length=255,title="type of
building",alternateID=True,notNone=True)
    description = StringCol(length=255,title="description of the
building type",notNone=True)
    containers = ForeignKey("container")


class region(SQLObject):
    regionname = StringCol(length=255,title="name of the
region",alternateID=True,unique=True,notNone=True)
    landblocks = StringCol(length=255,title="landblocks owned by this
region")





On Oct 15, 3:18 pm, Irish <[EMAIL PROTECTED]> wrote:
> I'm trying out ModelDesigner, and either something mysteriously broke
> while I was away, or there's a problem in the Toolbox.
>
> I'm running Windows XP currently, on three machines, and Ubuntu on my
> home machine.  It seems that every time I try to "Write to file and
> Create Tables" I am rewarded with an error message that states that
> every class after the first couldn't be created, in the form of:
>
> Saved ~/model.py
> Tables Created:
> Table created for class (first class, regardless of contents)
> Failed to create Tables:
> Failed to create table for classs (second class, regardless of
> contents):'module' object has no attribute '(second class, once
> again)'
> Failed to create table for classs (third class, regardless of
> contents):'module' object has no attribute '(third class, once again)'
>
> This continues on for as many classes as I feel like creating.  I
> wasn't quite sure what specifics to go into, or what to post, so I
> suppose that's a good place for further recommendations.  I searched
> through the discussion group, and found a few other people with
> similar problems, but not necessarily the same, so I wanted to create
> a new thread.
>
> Oh, one more thing.  I've tried this three times so far, and it seems
> to corrupt the whole project.  If I exit and try to start the toolbox
> again, it will error out with more
> 'module' object has no attribute 'visit'
> style errors.  I can take down the exact traceback if necessary.  Is
> there anything I can do to fix this?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to