Hello Simon,

Thanks for your answer, acttually I don't use any web framework, I just did 
a html page and put Openlayers, GeoExt, and Ext code there. To display 
points/lines/polylines/rasters/etc., I use Mapserver, so I connect my 
PostGis database with OpenLayers. After putting the 
http://localhost/mop/py/dbmodel.py link, I get the whole model (I think 
this should be my model, is it right?), so the Apache works well =):

#created: 30 July 2012
#updated: 12 August 2012
#Gery

from sqlalchemy import *
from sqlachemy import create_engine, MetaData, Table
from sqlalchemy.orm import *
from sqlalchemy.orm import mapper, relation, backref, sessionmaker
from sqlalchemy.ext.declarative import declarative_base

# Setup the url, database engine and session
url = 'postgresql://postgres:password@localhost:5432/mop'
engine = create_engine(url, echo=True)
session = sessionmaker(bind=engine)
session = Session()

# Setup the declarative extension and metadata
Base = declarative_base(metadata=metadata)
metadata = MetaData(engine)

# Define the model classes
class Boreholes(Base):
        __tablename__ = 'boreholes_point_wgs84'
        __table_args__ = {'autoload':True}

# DDL Extensions for geometry specific DDL
GeometryDDL(Boreholes.__table__)


Do I really need a web framework? I know some people use GeoAlchemy and 
SqlAlchemy with Pylons, but I don't want to use that, well in general any 
web framework. What could it be that "something" you mentioned that I need? 
I've been reading that with PHP I can make the connection to do the HTTP 
requests/responds, am I right? is this the unique way or solution to do 
this?

Thanks again


> I'm probably missing something here, but are you running any kind of 
> web framework? What happens when you visit 
> http://localhost/mop/py/dbmodel.py in your web browser? 
>
> You need something running on the server which accepts HTTP requests 
> and responds with whatever data OpenLayers is expecting. There are 
> plenty of web frameworks to choose from 
> (http://wiki.python.org/moin/WebFrameworks/) - I happen to like 
> Pyramid, but you may want to start with something smaller such as 
> Flask. 
>
> Hope that helps, 
>
> Simon 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/M6kFU5TjOsAJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to