title: django dumpdata => load on heroku
body: <p>I'm trying to load the data from my sqlite database to heroku postgres but it is not working.</p>
  
  <p>First I ran:</p>
  
  <pre><code>manage.py dumpdata --indent 1 &gt; data.json
  </code></pre>
  
  <p>and then I tried to upload it to heroku with (after I committed the file to heroku):</p>
  
  <pre><code>heroku run python manage.py loaddata data.json
  </code></pre>
  
  <p>but it just didn't work...</p>
  
  <p>it gave me errors:</p>
  
  <pre><code>Running `python manage.py loaddata data.json` attached to terminal... up, run.92
  01
  Traceback (most recent call last):
    File "manage.py", line 11, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/_
  _init__.py", line 385, in execute_from_command_line
  utility.execute()
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/_
  _init__.py", line 377, in execute
  self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/b
  ase.py", line 288, in run_from_argv
  self.execute(*args, **options.__dict__)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/b
  ase.py", line 338, in execute
  output = self.handle(*args, **options)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/c
  ommands/loaddata.py", line 61, in handle
  self.loaddata(fixture_labels)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/c
  ommands/loaddata.py", line 91, in loaddata
  self.load_label(fixture_label)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/c
  ommands/loaddata.py", line 148, in load_label
  obj.save(using=self.using)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/serializers/
  base.py", line 173, in save
  models.Model.save_base(self.object, using=using, raw=True)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py
  ", line 617, in save_base
  updated = self._save_table(raw, cls, force_insert, force_update, using, upda
  te_fields)
    File "/app/.heroku/python/lib/python2.7/sitepackages/django/db/models/base.py
  ", line 679, in _save_table
  forced_update)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py
  ", line 723, in _do_update
  return filtered._update(values) &gt; 0
    File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/query.p
  y", line 600, in _update
  return query.get_compiler(self.db).execute_sql(CURSOR)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/com
  piler.py", line 1004, in execute_sql
  cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/com
  piler.py", line 786, in execute_sql
  cursor.execute(sql, params)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/utils
  .py", line 65, in execute
  return self.cursor.execute(sql, params)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/db/utils.py",     line 94, in __exit__
  six.reraise(dj_exc_type, dj_exc_value, traceback)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/utils
  .py", line 65, in execute
  return self.cursor.execute(sql, params)
  django.db.utils.ProgrammingError: Problem installing fixture '/app/data.json': C
  ould not load contenttypes.ContentType(pk=1): relation "django_content_type"     does not exist
  LINE 1: UPDATE "django_content_type" SET "name" = 'log entry', "app_... 
  </code></pre>
  
  <p>What may be the problem?</p>