Hello
I do not know much English
I have two tables:
db.define_table('category', Field('name'))
db.define_table('books',
Field('title', requires=IS_NOT_EMPTY('Введите название
книги'), label='Название*'),
Field('author', requires=IS_NOT_EMPTY('Введите автора'),
label='Автор*'),
Field('god', 'integer', label='Год выпуска'),
Field('number_of_pages', 'integer', label='Количество
страниц'),
Field('languages', label='Язык книги*'),
Field('category', 'reference category', label='Категория*'),
Field('description', 'text', label='Описание'),
Field('oblozhka', 'upload', label='Обложка'),
Field('book', 'upload', label='Файл книги*',
requires=IS_NOT_EMPTY('Загрузите файл книги'))
)
But when i add a record to a table, I get an error:
IntegrityError: foreign key constraint failed
How to fix it?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.