python - Synchronizing development PostgreSQL database on local machine -
i developed django website in linux, learning django , git along way; pushed source files bitbucket.
i'm in windows , wanted see if figure out how work on project windows (just practice version control). did following:
- installed python (3.4) installed virtualenv,virtualenvwrapper-win
- installed postgresql windows installer on website
- installed psycopg2 .whl file because pip insisting don't have c++
- installed git using windows installer website
- cloned bitbucket repository using git
- create virtualenv using virtualenvwrapper, installed dependencies requirements.txt (except psycopg2 had install manually)
now i'm bit confused database, need create new one? how synchronize local database created in linux? database part of version control?
i know sqlite has .sqlite file, postgresql seems work bit differently.
edit: recreated database , user in windows, how make sure information database synchronizes wherever i'm developing
fixtures can used move data between databases.
a fixture collection of data django knows how import database. straightforward way of creating fixture if you’ve got data use
manage.py dumpdata
command.
--
loading data easy: call
manage.py loaddata <fixturename>
, name of fixture file you’ve created. each time run loaddata, data read fixture , re-loaded database. note means if change 1 of rows created fixture , run loaddata again, you’ll wipe out changes you’ve made.
Comments
Post a Comment