>
> After these two steps and before starting Web2py, I check on the
> PostgreSQL server running on the localhost and make sure that an empty
> 'mydb' indeed exists. Then I start Web2py server, and navigate to
> http://127.0.0.1:8000/myapp/account/register, where I type in email,
> pwds, and hit 'register' button, upon which if Web2py fails to create those
> Auth tables by executing
> auth.define_tables()
> in the model file 'account.py', I will get an error saying that the table
> 'user_login' (effectively 'auth_user') does not exist. But strangely
> enough, sometimes tables do get created and this go through.
>
Not sure what's going on here. Note, the tables should only be created by
web2py once -- after that, on subsequent requests, web2py will simply
access the tables that have already been created. So, if it works on one
request, it should continue to work on subsequent requests. Is it possible
you are somehow deleting any of the *.table files in your application's
/databases folder? If the *.table file for the user_login table gets
deleted, web2py will assume the table doesn't exist.
Also, in addition to account.py, do you also have a db.py or other model
file(s)? If so, are you defining your db object in more than one place --
you shouldn't do that?
> ## set the content of the verification email
> auth.messages.verify_email = 'Please click on the link: http://' + \
> request.env.http_host + \
> URL(r=request,c='account',f='verify_email') + \
> '/%(key)s to verify your email address'
>
>
> Again, not sure what the problem is -- it worked fine for me using your
exact code. The only thing I noticed is that two of your lines above had an
extra space after the line continuation character ("\"), which caused a
syntax error.
Anthony