-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hi guys!
Thank you very much for creating and sharing this project. I'm really excited about the possibilities.
I got the basics working, however I ran into a problem trying to connect to an sqlite3 database. I suspect my problem revolves around improper scope, naming, or something like that.
By the way, I really appreciate that you guys wrote the basic tutorial leaving out stuff like app.@route, etc. and introduce that later on. Personally I find the OO stuff just confusing, and unnecessarily complex for a small project.
Anyway, when trying to implement the sqlite plugin, the examples given all revolve around OO type naming. I tried to convert it, even looked at different examples, including the source, but I still could not get it to work. I keep getting variations of the error in the title.
I first tried this way (minimal example):
# app.py
from bottle import install, request, route, run, static_file, template
from bottle_sqlite import SQLitePlugin
install(SQLitePlugin(dbfile='database.sqlite3'))
Then I try this way:
# app.py
from bottle import install, request, route, run, static_file, template
from bottle.ext import sqlite
install(sqlite.Plugin(dbfile='database.sqlite3'))
But when I launch my app.py I just keep getting variation of:
from: too many arguments
from: too many arguments
./app.py: line 4: syntax error near unexpected token `SQLitePlugin'
./app.py: line 4: `install(SQLitePlugin(dbfile='database.sqlite3'))'