<commit_before># -*- coding: utf-8 -*-

db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])

response.generic_patterns = ['*'] if request.is_local else []

from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
auth = Auth(db)
crud, service, plugins = Crud(db), Service(), PluginManager()

## create all tables needed by auth if not custom tables
auth.define_tables(username=False, signature=False)

## configure email
mail = auth.settings.mailer
mail.settings.server = 'logging' or 'smtp.gmail.com:587'
mail.settings.sender = '<EMAIL>'
mail.settings.login = 'username:password'

## configure auth policy
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.settings.reset_password_requires_verification = True

<commit_msg>Defini tablas: libros y contenedor<commit_after># -*- coding: utf-8 -*-

db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])

response.generic_patterns = ['*'] if request.is_local else []

from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
auth = Auth(db)
crud, service, plugins = Crud(db), Service(), PluginManager()

## create all tables needed by auth if not custom tables
auth.define_tables(username=False, signature=False)

## configure email
mail = auth.settings.mailer
mail.settings.server = 'logging' or 'smtp.gmail.com:587'
mail.settings.sender = '<EMAIL>'
mail.settings.login = 'username:password'

## configure auth policy
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.settings.reset_password_requires_verification = True


# Definicion de tablas

Contenedor = db.define_tables('contenedor',
				Field('noombre'),
				Field('descripcion', 'text'),
				Field('contenedor_superior', 'reference contenedor'),
				Field('es_contenedor', 'boolean'),
				auth.signature,
				format='%(nombre)s'
			)

Libro = db.define_tables('libro',
			Field('titulo'),
			Field('descripcion'),
			Field('isbn'),
			Field('autor'),
			Field('editorial'),
			Field('fecha_publicacion', 'date'),
			Field('ubicacion', 'reference contenedor'),
			Field('cantidad_total', 'integer'),
			Field('cantidad_prestados', 'integer'),
			Field('cantidad_disponible'),
			auth.signature,
			format='%(titulo)s'
			)
{'fraction_non_alphanumeric': 0.14347264110297286, 'fraction_numerical': 0.004308487720809996, 'mean_word_length': 5.8698224852071, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1488295', 'n_tokens_mistral': 803, 'n_tokens_neox': 730, 'n_words': 154}