I just tried and the current version of Studio does indeed not work
MySQL. This is because MySQL requires that a length for VARCHARs. I'll
propose a fix for that. Thanks for reporting the issue.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.l...@camptocamp.com
http://www.camptocamp.com
The paster setup-app command is in charge of setting up the database
(creating tables and inserting default data).
Have you successfully executed this command?
http://camptocamp.github.com/Studio/installation_guide.html#set-up
> Error log is here:
>
> Fri Mar 11 05:41:54 2011] [error] [client 109.121.94.91]
> ^, referer: http://mape.grajs.co.rs/studio/signin
> [Fri Mar 11 05:41:54 2011] [error] [client 109.121.94.91] 'SELECT
> "user".password AS user_password, "user".id AS user_id, "user".name AS
> user_name, "user".login AS user_login \\nFROM "user" \\nWHERE
> "user".login = %(login_1)s \\n LIMIT 2 OFFSET 0' {'login_1': 'admin'},
> referer: http://mape.grajs.co.rs/studio/signin
> [Fri Mar 11 05:44:28 2011] [error] [client 109.121.94.91] Error -
> <class 'sqlalchemy.exc.ProgrammingError'>: (ProgrammingError) relation
> "user" does not exist, referer: http://mape.grajs.co.rs/studio/signin
>
--
Bruno Binet
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
There may be two problems, one specific to MySQL, and one specific to
PostgreSQL.
As I said earlier in this thread I've been able to reproduce the issue
with MySQL. With MySQL setup-app fails because we attempt to create
VARCHAR colums of undefined lengths, which MySQL doesn't support.
Changing all occurences of sa.types.String to sa.types.String(255) in
the Studio model code makes setup-app successfully complete with
MySQL. I have a pull request pending for my changes, but I'm not yet
confident with these changes as limiting the lengths of our strings to
255 may not always be appropriate, especially for the JSON custom type
that we define.
>
> The setup script does complete properly, because when using sqlite it
> is possible to login. Although using sqlite and WSGI does not work so
> well - we are unable to write to the sqlite db, even with chmod 777 as
> back as we securely can.
Our live demo does rely on SQLite and Apache mod_wsgi. The db file
*and* the directory containing that db file must be writable by the
Apache user (www-data).
>
>
> Eric, Bruno if you can't replicate this issue, you can contact me and
> I can provide a login on a test domain to diagnose this further.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Here's the pull request:
<https://github.com/camptocamp/Studio/pull/7>. I think it's in good
shape now. All tests pass with SQLite, MySQL and PostgreSQL. Once
pulled I'll release 0.5.1, and update the go-studio.py script
accordingly.
Bruno, it'd be great if you could take a look at my pull request. Thanks.
Thanks for the review Bruno.
0.5.1 is relased. To upgrade an existing virtualenv use <easy_install
-U studio> (the virtualenv must have been activated prior to running
this command).