> On Monday, August 13, 2012 9:23:43 PM UTC+2, Gery wrote:
>>
>>
>> Hello, I'm new around here and I've been using SQLalchemy (SA) for a
>> while. I work with PostGis (PG), OpenLayers (OL), ExtJS, GeoExtJS and now
>> with the great SA and GeoAlchemy. I have one problem, I created a model
>> where I defined one table of my PG database, it has a url like this: url =
>> 'postgresql://postgres:password@localhost:5432/pgdb'. In my HTML, I have
>> some maps displayed with OL and a toolbar built with ExtJS and GeoExtJS. I
>> put a search button there using ExtJS, and the OL protocol code to get the
>> data. This protocol has an url option, in this way:
>>
>>  var searchformPanel = new Ext.form.FormPanel(
>>         {
>>                 width: 250,
>>                 bodyStyle: 'padding:5px',
>>                 labelAlign: 'top',
>>                 defaults:
>>                 {
>>                         anchor: '100%'
>>                 },
>>                 protocol: new OpenLayers.Protocol.HTTP(
>>                 {
>>                         url: 'http://localhost/mop/py/dbmodel.py',
>>                         format: new OpenLayers.Format.GeoJSON()
>>                 }
>>                 ),
>>                 items:
>>                 etc,etc......
>>
>> my problem is that in this url I wrote the whole path where my model
>> script is located, but after pressing the button I got nothing. I think I
>> need something else rather than only pointing the whole path and the python
>> script in the url mentioned above, is that correct? I've searched "how to
>> connect sqlalchemy to extjs" in google but didn't find any that solved this
>> doubt.
>>
>> Any support is very welcome, thanks in advance.
>>
>> Best regards,
>>
>> Gery
>

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 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/sqlalchemy?hl=en.

Reply via email to