$ tg-admin quickstart --elixir
/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.0beta5-py2.4.egg/
sqlalchemy/ext/activemapper.py:24: SADeprecationWarning:
SessionContext is deprecated. Use scoped_session().
Enter project name: qwert
Enter package name [qwert]:
Do you need Identity (usernames/passwords) in this project? [no] yes
...
cd qwert
./start-qwert.py
and ended up with the same results as previously mentioned.
easy_install -U "SQLAlchemy==0.3.10"
The other option is to drop Elixir and just use SA 0.4...
For your information I just commited a patch to 1.0 branch to make sure
the error does not pass unnoticed as it is now happening.
Florent.
For what it's worth Elixir's trunk (and upcoming 0.4 version) does
support SA 0.4. I hope to get it out the door before or slightly after
SA 0.4 "final" ships.
--
Gaëtan de Menten
http://openhex.org
easy_install http://elixir.ematia.de/svn/elixir/trunk/
to get the latest trunk version.
--
cheers
elvelind grandin
which means that you can just run
easy_install http://elixir.ematia.de/svn/elixir/trunk/
to get the latest trunk version.
easy_install -U "SQLAlchemy==0.3.10"
Has been working fine for now.
Maybe someone should talk about that with the SQAlchemy folks...
--Renier
We are working at the moment to make sure TG is SA 0.4 compatible
without being SA 0.3.10 incompatible (which means it will be possible
for people with older applications to just stay with 0.3.10 as long as
they need to port their code).
This cohabitation will be possible because the SA guys created 0.3.10 in
such a way that it exposes both the old and the new API.
Cheers,
Florent.
--- database.py.orig 2007-09-08 20:03:37.000000000 -0400
+++ database.py 2007-09-08 20:05:03.000000000 -0400
@@ -56,7 +56,7 @@
if not metadata.is_bound():
bind_meta_data()
- return sqlalchemy.create_session()
+ return sqlalchemy.orm.create_session()
metadata = activemapper.metadata
session = activemapper.Objectstore(create_session)
Will post this to the trac.
--Renier
Thanks. This was already in the SVN, but we are still working on more
fixes because other parts of TG are not ready yet.
If you are interested in using SA 0.4 with TurboGears I propose you
checkout the SVN head from the 1.0 branch and play with it. I'll commit
a bunch of fixes this afternoon that should make TG 1.0.x compatible
with old SA 0.3.10 based applications but which will also work with the
newer API from SA 0.4.
SA 0.3.10 will be the minimum requirement, because older versions do not
expose the same API as the 0.4 release.
Cheers,
Florent.
--Renier
Cheers,
Florent.
--Renier
After considering all the Python Web frameworks out there I finally
settled on TurboGears. Its open nature appeals to me and my plans for
an interactive site. However, I am a bit confused about the state of
TG 1.0, 1.1, 2.0. Where to start?
So, being prepared for things to come, I decided to use TG 1.0.3.2
with SQLAlchemy (and Genshi, MochiKit/Dojo later on, hopefully) and to
follow the Rough Docs at http://www.splee.co.uk/2006/10/14/simpleblog-part-1/.
However, after the first little editing of model.py the only thing I
get is the following:
> tg-admin sql create
Creating tables at sqlite:///devdata.sqlite
Traceback (most recent call last):
File "C:\Python25\Scripts\tg-admin-script.py", line 8, in <module>
load_entry_point('TurboGears==1.0.3.2', 'console_scripts', 'tg-
admin')()
File "c:\python25\lib\site-packages\TurboGears-1.0.3.2-py2.5.egg
\turbogears\co
mmand\base.py", line 389, in main
command.run()
File "c:\python25\lib\site-packages\TurboGears-1.0.3.2-py2.5.egg
\turbogears\co
mmand\base.py", line 115, in run
sacommand(command, sys.argv)
File "<string>", line 5, in sacommand
File "c:\python25\lib\site-packages\TurboGears-1.0.3.2-py2.5.egg
\turbogears\co
mmand\base.py", line 67, in sacreate
from turbogears.database import bind_meta_data, metadata
ImportError: cannot import name bind_meta_data
What is wrong here? Is it me or TG or SA or something else?
After that, I tried the same in TG 1.0.4b1 and was told that my sqlite
was outdated. The TG egg did not update it automatically and I cannot
figure out how to do this manually - stupid me. What now?
thanks a lot for your help
Andre
PS This is done with Python 2.5 on Windows for the moment.
I recommend using the current stable version with SQLAlchemy and Kid-,
and then migrate your projects to 1.1 (Genshi is very similar to Kid)
and 2.0 when there will be stable releases.
> So, being prepared for things to come, I decided to use TG 1.0.3.2
> with SQLAlchemy (and Genshi, MochiKit/Dojo later on, hopefully) and to
> follow the Rough Docs at http://www.splee.co.uk/2006/10/14/simpleblog-part-1/.
>
> However, after the first little editing of model.py the only thing I
> get is the following:
Maybe you installed SA 0.4, but TG 1.0.3.2 works only with SA 0.3.x.
This will be fixed in TG 1.0.4.
> After that, I tried the same in TG 1.0.4b1 and was told that my sqlite
> was outdated. The TG egg did not update it automatically and I cannot
> figure out how to do this manually - stupid me. What now?
Actually it is SA asking for an update of sqlite. But that's simple,
just type: easy_install pysqlite
-- Christoph
When you start the project use -s:
tg-admin quickstart -s
In dev.cfg in your project folder you need to have something along these
lines:
sqlalchemy.dburi="firebird://user:password@localhost:3050/C:/dir/project/tbtest.fdb"
Werner
Work can go on...
cheers
Andre
On Sep 14, 10:42 am, Christoph Zwerschke <c...@online.de> wrote:
> apm wrote:
> > After considering all the Python Web frameworks out there I finally
> > settled on TurboGears. Its open nature appeals to me and my plans for
> > an interactive site. However, I am a bit confused about the state of
> > TG 1.0, 1.1, 2.0. Where to start?
>
> I recommend using the current stable version with SQLAlchemy and Kid-,
> and then migrate your projects to 1.1 (Genshi is very similar to Kid)
> and 2.0 when there will be stable releases.
>
> > So, being prepared for things to come, I decided to use TG 1.0.3.2
> > with SQLAlchemy (and Genshi, MochiKit/Dojo later on, hopefully) and to
> > follow the Rough Docs athttp://www.splee.co.uk/2006/10/14/simpleblog-part-1/.
> So, being prepared for things to come, I decided to use TG 1.0.3.2
Good choice :-)
> from turbogears.database import bind_meta_data, metadata
> ImportError: cannot import name bind_meta_data
try to install SA:
easy_install -U "SQLAlchemy==0.3.10"
to make sure you have it because it is not a direct requirement for TG 1.0.3
Cheers,
Florent Aide.