I'm not sure there is a solution to this problem without changes to sphinx,
but here is what I've got. In my __init__.py, I have:
Session = sessionmaker()
Base = declarative_base()
def init_model(**kwargs):
Initialize the database model
mydb = URL(drivername='mysql',
I've been hitting the same wall, and decided that autoload was the
wrong way to go. Once you want to generate documentation for a
database from the models, you typically do not want allow frequent
changes of the DB structure anymore. So at this point, I just wrote a
script to create basic model
On Sep 4, 2012, at 9:00 AM, Sean Davis wrote:
I'm not sure there is a solution to this problem without changes to sphinx,
but here is what I've got. In my __init__.py, I have:
Session = sessionmaker()
Base = declarative_base()
def init_model(**kwargs):
Initialize the database
Hi
I'm trying to add __lshift__ and __rshift__ to my (now well known :)
Geometry's comparator_factory, but it looks like SQLAlchemy isn't
happy with it.
from sqlalchemy.types import UserDefinedType
class Geometry(UserDefinedType):
class
On Sep 4, 2012, at 7:02 AM, David McKeone wrote:
I've been using hybrid properties recently and ran into a solution that would
only work on PostgreSQL. That's fine for my usage, but it's so ugly I was
curious if there was a better, more portable way to do this.
Here is the scenario: x
Those methods aren't part of the contract at the moment but I can add them in.
On Sep 4, 2012, at 10:30 AM, Eric Lemoine wrote:
Hi
I'm trying to add __lshift__ and __rshift__ to my (now well known :)
Geometry's comparator_factory, but it looks like SQLAlchemy isn't
happy with it.
On Tue, Sep 4, 2012 at 4:36 PM, Michael Bayer mike...@zzzcomputing.com wrote:
Those methods aren't part of the contract at the moment but I can add them in.
I can live without them, it'd just be nice to be able to use the
actual PostGIS operators in SQLAlchemy apps.
Thank you!
--
Eric
they're in tip. thanks for testing all this !
On Sep 4, 2012, at 10:40 AM, Eric Lemoine wrote:
On Tue, Sep 4, 2012 at 4:36 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
Those methods aren't part of the contract at the moment but I can add them
in.
I can live without them, it'd
On Tue, Sep 4, 2012 at 4:45 PM, Michael Bayer mike...@zzzcomputing.com wrote:
they're in tip. thanks for testing all this !
Great!
Another issue, with contains this time:
from sqlalchemy.types import UserDefinedType
class Geometry(UserDefinedType):
class
can't do __contains__ due to Python behavior:
class Foo(object):
def __add__(self, other):
return (self, add, other)
def __contains__(self, other):
return (self, contains, other)
f1 = Foo()
assert f1 + 5 == (f1, add, 5)
assert 5 in f1 == (f1, contains, 5), 5 in f1
On Tue, Sep 4, 2012 at 5:18 PM, Michael Bayer mike...@zzzcomputing.com wrote:
can't do __contains__ due to Python behavior:
class Foo(object):
def __add__(self, other):
return (self, add, other)
def __contains__(self, other):
return (self, contains, other)
f1 =
On Tue, Sep 4, 2012 at 5:20 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
On Tue, Sep 4, 2012 at 5:18 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
can't do __contains__ due to Python behavior:
class Foo(object):
def __add__(self, other):
return (self, add, other)
On Tue, Sep 4, 2012 at 5:30 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Sep 4, 2012, at 11:24 AM, Eric Lemoine wrote:
On Tue, Sep 4, 2012 at 5:20 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
On Tue, Sep 4, 2012 at 5:18 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
On Sep 4, 2012, at 11:32 AM, Eric Lemoine wrote:
On Tue, Sep 4, 2012 at 5:30 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
On Sep 4, 2012, at 11:24 AM, Eric Lemoine wrote:
On Tue, Sep 4, 2012 at 5:20 PM, Eric Lemoine
eric.lemo...@camptocamp.com wrote:
On Tue, Sep 4, 2012 at 5:18
On Tue, Sep 4, 2012 at 5:38 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Sep 4, 2012, at 11:32 AM, Eric Lemoine wrote:
On Tue, Sep 4, 2012 at 5:30 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
On Sep 4, 2012, at 11:24 AM, Eric Lemoine wrote:
On Tue, Sep 4, 2012 at 5:20 PM,
Great, thanks Mike! I only need to do PostgreSQL, but I will look into the
@compiles decorator to make a more general solution.
.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To view this discussion on the web visit
thanks! did the trick!
On Tuesday, August 28, 2012 11:43:56 PM UTC+3, alonn wrote:
some of my sqlalchemy 0.7.3 (with tubrogears 2.1.4) models work with a
mssql 2005 db using pyodbc.
(No can't change this, don't bother suggesting, this is an enterprise
financial system, I can just read and
Hello,
I am using SA 0.6.9 at the moment and get a StaleDataError if I run the
code attached. In 0.7 it works without error. I wanted to understand
what’s changed and have browsed Trac and the migration guide, but only
came across similar looking issues (like
18 matches
Mail list logo