Skip to content

Commit 3b666ca

Browse files
cclaussdefnull
authored andcommitted
tutorial_app.rst: Fix undefined name in Create An SQL Database
> NameError: name 'conn' is not defined. Did you mean: 'connection'?
1 parent 1dab4e7 commit 3b666ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/tutorial_app.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Prior to starting to work on the ToDo application, the database to be used later
9797
cursor.execute("INSERT INTO todo (task,status) VALUES ('Visit the Python website',1)")
9898
cursor.execute("INSERT INTO todo (task,status) VALUES ('Test various editors for and check the syntax highlighting',1)")
9999
cursor.execute("INSERT INTO todo (task,status) VALUES ('Choose your favorite WSGI-Framework',0)")
100-
conn.commit()
100+
connection.commit()
101101

102102
These commands generate a database-file named `todo.db` with a table called ``todo``. The table has three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for each row, which is used later to reference rows of data. The column ``task`` holds the text which describes the task, it is limited to max 100 characters. Finally, the column ``status`` is used to mark a task as open (represented by the value 1) or closed (represented by the value 0).
103103

0 commit comments

Comments
 (0)