yusufgundogdu commited on
Commit
b9521ec
·
verified ·
1 Parent(s): c7d6271

Update database.py

Browse files
Files changed (1) hide show
  1. database.py +6 -1
database.py CHANGED
@@ -1,7 +1,12 @@
1
  import sqlite3
 
 
 
 
 
2
 
3
  def create_connection():
4
- conn = sqlite3.connect("database.db")
5
  return conn
6
 
7
  def create_table():
 
1
  import sqlite3
2
+ import os
3
+
4
+ # Veritabanını geçerli çalışma dizinine oluştur
5
+ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
6
+ DB_PATH = os.path.join(BASE_DIR, "database.db")
7
 
8
  def create_connection():
9
+ conn = sqlite3.connect(DB_PATH)
10
  return conn
11
 
12
  def create_table():