Haha!

> Then using phpmyadmin I create user, and create database happo.

but you did not set

auth.define_tables(migrate=False)

So I am not sure what happened. You tests may have messed up various
things.

What to do?
1) delete database happo
2) delete everything in databases/ folder
3) recreate happo and give the use permission to create/alter tables
4) use auth.define_table(migrate="happo")
5) start you app again




On Jul 3, 2:45 am, Mico Siahaan <mico.siah...@gmail.com> wrote:
> Hi Yarko,
>
> I will try as details as I could :).
> 1. This is my first try with web2py, basically I just want to make
> sample app. It will be a website that member can login and update his
> status so other member can know the update
> 2. For development, I am using win vista business and xampp for
> windows (it has apache and mysql)
> 3. So from xampp control panel I start mysql
> 4. Then using phpmyadmin I create user, and create database happo.
> Give permission for that user to create and modify all tables in happo
> database
> 5. Then I start web2py
> 6. Create new application
> 7. Edit db.py. I uncommented lines of auth settings.
> 8. After that I access index method of appadmin.py controller.
> 9. Got error tickets
>
>  File "C:\Python25\Lib\site-packages\MySQLdb\cursors.py", line 166, in execute
>    self.errorhandler(self, exc, value)
>  File "C:\Python25\Lib\site-packages\MySQLdb\connections.py", line
> 35, in defaulterrorhandler
>    raise errorclass, errorvalue
> ProgrammingError: (1146, "Table 'happo.auth_user' doesn't exist")
>
> while my db.py (full, as requested by massimo)
>
> if request.env.web2py_runtime_gae: # if running on Google App Engine
>    from gluon.contrib.gql import *
>    ### connect to Google BigTable
>    db = GQLDB()
>    ## and store sessions and tickets there
>    session.connect(request, response, db=db)
>    ### or use the following lines to store sessions in Memcache
>    # from gluon.contrib.memdb import MEMDB
>    # from google.appengine.api.memcache import Client
>    # session.connect(request, response, db=MEMDB(Client()))
> else: # else use a normal relational database
>    # if not, use SQLite or other DB
>    #db = SQLDB('sqlite://storage.sqlite')
>    db = SQLDB('mysql://my_user:my_pas...@localhost/happo', pool_size=0)
>
> from gluon.tools import *
> auth=Auth(globals(),db)            # authentication/authorization
> auth.define_tables()               # creates all needed tables
> crud=Crud(globals(),db)            # for CRUD helpers using auth
> service=Service(globals())         # for json, xml, jsonrpc, xmlrpc, amfrpc
>
> ## uncomment as necessary or consult docs for more options
> crud.settings.auth=auth           # (optional) enforces authorization on crud
> mail=Mail()                                  # mailer
> mail.settings.server='smtp.gmail.com:587'    # your SMTP server
> mail.settings.sender='mico.siah...@gmail.com'         # your email
> mail.settings.login='mico.siahaan:gmaipass'      # your credentials
> auth.settings.mailer=mail         # for user email verification
> auth.settings.registration_requires_verification = False
> auth.settings.registration_requires_approval = True
> auth.messages.verify_email = \
>  'Click on the 
> linkhttp://127.0.0.1:8000/customer/default/user/verify_email/%(key)sto
> verify your email'
>
> so basically I have not done much :)
> --
> Mico Siahaan
> ---
> Email: mico.siah...@gmail.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to