Hi guys this is my first post so just let me know if I'm doing
anything wrong :) (Massimo recommended I ask questions here about
web2py rather than on Stack Overflow)


As the title says: I keep getting the error: invalid literal for int()
with base 10: 'Plumber'
I've done searching and it seems to be a common error, but I can't
figure out how to fix it from the answers I've already read, here is
my code (that I think is the needed code to solve the error):

___DB.PY___: (model)

db.define_table('title',
                Field('name'),
               )

db.define_table(auth.settings.table_user_name,
                Field('first_name'),
                Field('last_name'),
                Field('email'),
                Field('password','password', length=512,
readable=False, label='Password'),
                Field('title', db.title),
                Field('bio','text'),
                Field('phone'),
                Field('website'),
                Field('address'),
                Field('registration_key', length=512,
                    writable=False, readable=False, default=''),
                Field('reset_password_key', length=512,
                    writable=False, readable=False, default=''),
                Field('registration_id', length=512,
                    writable=False, readable=False, default=''),
                )

listing = db[auth.settings.table_user_name]
listing.title.requires = [
    IS_IN_DB(db, db.title.name)]


___DEFAULT.PY___: (controller)

def index():
    painters = db(db.listing.title == 23).select()
    items = []
    for painter in painters:
        items.append(A(painter.first_name, _href=URL('index')))
    return dict(items=items)


In my view I just have {{=items}}

On top of this I can't create new users from the registration form or
the appadmin, because it brings up the same error when I submit both
registration forms.

I'm so confused (because I'm an obvious newbie :P) any help would be
greatly appreciated! :)

Reply via email to