| author | ymh <ymh.work@gmail.com> |
| Mon, 31 May 2010 11:14:39 +0200 | |
| changeset 32 | e28089cee66c |
| parent 29 | cc9b7e14412b |
| permissions | -rw-r--r-- |
| 0 | 1 |
import os |
2 |
import sys |
|
3 |
||
4 |
from django.db.backends import BaseDatabaseClient |
|
5 |
||
6 |
class DatabaseClient(BaseDatabaseClient): |
|
7 |
executable_name = 'sqlite3' |
|
8 |
||
9 |
def runshell(self): |
|
10 |
args = [self.executable_name, |
|
| 29 | 11 |
self.connection.settings_dict['NAME']] |
| 0 | 12 |
if os.name == 'nt': |
13 |
sys.exit(os.system(" ".join(args))) |
|
14 |
else: |
|
15 |
os.execvp(self.executable_name, args) |
|
16 |