1👍
change the conf. like this if you are using sqlite (by the this is just for reference made changes according to your need like dbname and etc.)
DATABASES = {
'default': {
'NAME': os.path.join(BASE_DIR, 'yourdbname.sqlite'),
'ENGINE': 'django.db.backends.sqlite3',
}
}
this will create db by name “yourdbname” where your apps settings.py resides plus you can refer to this link i guess it will help you
0👍
If you use sqlite3 to store the data, you should change the conf file,here is an example , just change the db file location:
DATABASES = {
'default': {
'ENGINE': 'sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': './db.db', # Or path to database file if using sqlite3.
# The following settings are not used with sqlite3:
'USER': 'dataBase',
'PASSWORD': '',
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '', # Set to empty string for default.
}
}
- [Answer]-In a Django web application, would large files or many unnecessary import statements slow down my server?
- [Answer]-Create user without calling manager create_user method in Django
- [Answer]-Django – Global name 'PayLaneRestClient' is not defined
Source:stackexchange.com