On Tue, Oct 2, 2012 at 7:26 PM, Gery . <gameji...@hotmail.com> wrote:
>
> thanks for the email, it seems that you know a lot about this stuff, it'd be
> great if you could share what you know so in that way we will learn from
> you, but as expected you won't do it, your "Sorry I can't be more help," is
> very clear as always. But hey anyway, I appreciate that you demostrate how
> you really are.
>

I was just trying to demonstrate that what you are trying to do is
complicated, with a lot of interactions between different
technologies. You need to break it down into smaller tasks that you
can test, and get each piece working before starting on the next.

I recommend that you start by taking the example GeoJSON file from
http://www.geojson.org/geojson-spec.html#examples and saving that on
your web server. Change your javascript to load that file, and check
that you can actually see the data from the file in your application.
If you can't get this working you'll need to talk to someone who knows
about OpenLayers (I don't know anything about it)

Once you've done that, put a python script in the cgi-bin directory of
your web server that looks something like this:

------------------------------
#!/usr/bin/env python
# CGI scripts start by sending the HTTP headers. The only
# one you absolutely need is the Content-type header.
# I'm not sure if OpenLayers requires a specific content type
# so you may need to experiment here.
print "Content-type: application/json"

# In HTTP, a blank line separates the headers from the body
# of the response
print ""

# Anything else that you print forms the body of the response.
# In this case, we just want to send the example GeoJSON data.
print """
<include the example GeoJSON file here>
"""
------------------------------

Visit http://localhost/cgi-bin/yourscript.py in your web browser and
verify that you see the GeoJSON data. If that doesn't work, you'll
probably need to contact the Python mailing list.

Update your Javascript to point to that URL. You should still be able
to see the data within your application.

Once you've got all that working, you can start adding SQLAlchemy into
the python script. Let us know when you get there and we might be able
to help.

Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
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