how to create sql

0 views
Skip to first unread message

manuhack

unread,
Nov 21, 2007, 8:17:12 AM11/21/07
to tg-registration
Hi,

I just follow the instruction and try a new project with
registration. After

tg-admin quickstart -t registration

it works well. Then I modify dev.cfg and run

tg-admin sql create

but then I run

tg-admin sql list, it shows

mysite.model.VisitIdentity
mysite.model.Visit
mysite.model.Group
mysite.model.User
mysite.model.Permission

and when I go to mysite/registration and fill in all the info and
click register, an error

ProgrammingError: Table 'mysite.registration_pending_user' doesn't
exist

appears. So what is the right way to create the sql table? Thanks.

Patrick Lewis

unread,
Nov 21, 2007, 8:47:57 AM11/21/07
to tg-registration
I think you are probably running into a bug that sometimes appeared in
the 0.3 release. The tables were supposed to be autogenerated, but it
doesn't always seem to work. Try these two commands (from tg-admin
shell):

import register_model as r
r.create_registration_tables()

Manu Hack

unread,
Nov 21, 2007, 8:58:33 AM11/21/07
to tg-regi...@googlegroups.com

I can import but the second command doesn't work. I just tried running

r.RegistrationPendingUser.createTable()

and now I can submit the form in registration/new and move to
registration/create.

However, in tg-admin toolbox catwalk I still could find the
RegistrationPendingUser.

Thanks!

Patrick Lewis

unread,
Nov 21, 2007, 9:18:28 AM11/21/07
to tg-registration


On Nov 21, 8:58 am, "Manu Hack" <manuh...@gmail.com> wrote:
> On Nov 21, 2007 8:47 AM, Patrick Lewis <patrickhle...@gmail.com> wrote:
>
> > import register_model as r
> > r.create_registration_tables()
>
> I can import but the second command doesn't work. I just tried running
>
> r.RegistrationPendingUser.createTable()
>
> and now I can submit the form in registration/new and move to
> registration/create.
>
> However, in tg-admin toolbox catwalk I still could find the
> RegistrationPendingUser.
>
> Thanks!

I believe not seeing it in catwalk is expected. Catwalk can only pull
values from one model file. Or at least that was the case last time I
looked.
Reply all
Reply to author
Forward
0 new messages