Hi Ronn, read this page of the wiki tutorial, and take care of the warning. http://www.turbogears.org/2.0/docs/main/Wiki20/page4.html
Marko Ronn Ross schrieb: > I'm having trouble setting up my first model by myself. When I run > paster setup-app development.ini I get this error: > > from rads.model import DeclarativeBase, metadata, DBSession > ImportError: No module named model > > My model looks good(too me), but it has trouble when I'm importing > rads.model. Can someone point me in the right direction? Here is my model: > > # -*- coding: utf-8 -*- > > from sqlalchemy import * > from sqlalchemy.orm import mapper, relation > from sqlalchemy import Table, ForeignKey, Column > from sqlalchemy.types import Integer, Unicode > from sqlalchemy.orm import relation, backref > > from rads.model import DeclarativeBase, metadata, DBSession > > class Aoi (DeclarativeBase): > __tablename__ = 'aoi' > > aoi_ref = Column(Integer, primary_key=True, autoincrement=True, > nullable=False) > name = Column(String(100)) > date_created = Column(Date) #this may not be an actual date > lat_min = Column(Float) > lat_max = Column(Float) > lng_min = Column(Float) > lng_max = Column(Float) > > class Step(DeclarativeBase): > __tablename__ = 'step' > > step_ref = Column(Integer, primary_key=True, autoincrement=True, > nullable=False) > name = Column(String(50)) > at = Column(Interger) > > class Target(DeclarativeBase): > __tablename__ = 'target' > > target_ref = Column(Integer, primary_key=True, autoincrement=True, > nullable=False) > lat = Column(Float) > lng = Column(Float) > alt = Column(Integer) > heading = Column(Integer) > platform_ref = Column(Integer) > mission_ref = Column(Integer) > major = Column(Integer) > minor = Column(Integer) > note = Column(Text) > date = Column(Date) #this may not be an actual date > mgrs = Column(String(20)) > angle = Column(Integer) > type = Column(String(50)) > speed = Column(Float) > tail = Column(String(10)) > freq = Column(Float) > audio = Column(String(100)) > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

