Banco MySQL

4 views
Skip to first unread message

Leonardo Santos

unread,
Oct 6, 2014, 3:52:43 PM10/6/14
to chipi...@googlegroups.com
Estou fazendo a alteração do banco padrão nos arquivos db.py tanto na pasta da aplicação quanto do admin para usar MYSQL e mesmo assim está sendo criado tato as tabelas no My SQL como no SQLite. O que preciso fazer para corrigir isso os log's não me ajudam.

Segue trecho do db.py

# -*- coding: utf-8 -*-



## if SSL/HTTPS is properly configured and you want all HTTP requests to

## be redirected to HTTPS, uncomment the line below:


# request.requires_https()


# Set the database conection:

    

db = DAL('mysql://txxxxxxx:5F47...@127.0.0.1/xxxxxxxxo',check_reserved=['all'])


## by default give a view/generic.extension to all actions from localhost

## none otherwise. a pattern can be 'controller/function.extension'

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

## (optional) optimize handling of static files

# response.optimize_css = 'concat,minify,inline'

# response.optimize_js = 'concat,minify,inline'


#########################################################################

## Here is sample code if you need for

## - email capabilities

## - authentication (registration, login, logout, ... )

## - authorization (role based authorization)

## - services (xml, csv, json, xmlrpc, jsonrpc, amf, rss)

## - old style crud actions

## (more options discussed in gluon/tools.py)

#########################################################################


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.settings.extra_fields['auth_user']= [

    Field("avatar", "upload", label=T('User avatar.')),

    Field("address", "string", label=T('Address.')),



Reply all
Reply to author
Forward
0 new messages