~chipaca/unity-lens-video/custom-user-agent

« back to all changes in this revision

Viewing changes to scripts/loaddata.sh

  • Committer: Janos Gyerik
  • Date: 2011-08-05 16:37:35 UTC
  • Revision ID: janos@axiom-20110805163735-hf2egtx00k3efaln
added dumpdata loaddata scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
cd $(dirname "$0")/..
 
4
 
 
5
default_mod=main
 
6
fixtures_dir=./$default_mod/fixtures
 
7
 
 
8
loaddata() {
 
9
    obj=$1
 
10
    test -f $obj && file=$obj || file=$fixtures_dir/$obj.json
 
11
    test $file && python manage.py loaddata $file || echo File missing: $file
 
12
}
 
13
 
 
14
loaddata Hacker
 
15
loaddata OneLiner
 
16
 
 
17
# eof