Thank you very much, please let me know if you know.Things I want to do or are in trouble
I want to import data into the DB of an app created with Django.
I am currently using "Django-import-export", but when I write
from import_export import resourcesand the import statement, I get an error.
● Error text
django.core.exceptions.ImproperlyConfigured: Requested setting IMPORT_EXPORT_USE_TRANSACTIONS, but settings are not configured.You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure () before accessing settings.
I'm trying to set IMPORT_EXPORT_USE_TRANSACTIONS in settings.py to True while reading the official text, or trying to load settings explicitly, but it doesn't work.
I just need to be able to import data into the Django app's DB, so I'm not particular about this, but is there any good way?Environment etc.
Mac OS High Sierra 10.13.6
Answer # 1
I used to call shell when writing an import statement, but I changed the way to call it as follows.
$python manage.py shell
That's it! ! !
- django connection to the mysql database and table creation examples
- How to get data from mysql database to echarts in Django
- Django framework configuration mysql database implementation process
- how to create a database with mysql
- Implementation of database migration in django
- Steps to modify the path of the MySQL database data file under Linux
- Implementation of python and mysql database interaction
- How to change the MySQL database directory location under Linux (CentOS)
- Detailed MySQL database optimization table and database operation examples
- MySql table, database, shard and partition knowledge points
- How MySQL Database Encrypts and Decrypts Sensitive Data
- mysql - i want to display the data saved in the database at any location
- mysql database: [ERROR] unknown option&# 39;-skip-grant-tables&# 39;
- Django app configure multiple database code examples
- MySQL scheduled backup database operation example
- Django implementation converts data obtained from database to dict
- Django implementation to change a field in the database and data in the field segment
- django implements the database query to achieve the returned result set to json
- mysql - about database field names
- Use of save and update of Django database operations
- dealing with errors (bind: address already in use) when building a django development environment
- importerror in urlspy with django
- python - i want to make the file upload successful
- python - how to specify category of article to display in django database operation
- python - about uploading youtube using google-auth
- i am getting angry with improperlyconfigured: mysql driver not installed! in csv import
- python - how to display the list of pvs in the order of pvs for the articles that have acquired pvs with positive integer field
- python - table is not displayed in admin (administration site screen) of django using mysql
- django pulldown (integerfield) result display method
- python - [django] i can't log in for some reason