Need to keep the size of the package down, so is it possible to compress the initial data in some supported format for syncdb to pickup?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
.tgz implies an archive of more than one file; it’s the suffix for a gzipped Tape Archive file. Django’s loaddata does not support it.
Syncdb uses the loaddata command to load initial data. If you gzip your file, in which case it will have an extensions of .gz, then yes, syncdb will successfully load your data. According to the source code, syncdb can load uncompressed files, gzip files, bzip2 files (if you have bz2.py python module), and ZIP archives containing a single file within. They must still be named with the Django convention, e.g.: