Open MichaelDimmitt opened 7 years ago
-
unf/unf/settings.py
STATIC_URL = '/static/' import json FIXTURE_DIRS = ( '/Users/michaeldimmitt/new_h/todays_works_sat/unf/unf/fixtures/', '/Users/michaeldimmitt/new_h/todays_works_sat/unf/smirk/fixtures/', )
python manage.py dumpdata --format=json smirk > /Users/michaeldimmitt/new_h/todays_works_sat/unf/unf/fixtures/initial_data.json
???
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }
http://racingtadpole.com/blog/django-fixtures-to-copy-database/
./manage.py dumpdata --indent 2 > all.json; ./manage.py loaddata all.json;
@MichaelDimmitt
???
replace that with the below only in the docker since docker has mariadb:
DATABASES = { 'default': { 'ENGINE':'django.db.backends.mysql', 'NAME':'myproject', 'USER':'student', 'PASSWORD':'ask_mike', 'HOST':'localhost', 'PORT':'', } }
~python manage.py dumpdata -e contenttypes >dumpdata/debug-e.json
~
manage.py dumpdata --natural --indent=4 or ./manage.py dumpdata --exclude contenttypes > fixture.json
python manage.py dumpdata --format=xml smirk > fixtures/xml_info.xml
https://code.djangoproject.com/wiki/Fixtures