relation "hello_greeting" does not exist
<p>I'm trying the python tutorial on Heroku app (<a href="https://devcenter.heroku.com/articles/getting-started-with-python#introduction" rel="nofollow">https://devcenter.heroku.com/articles/getting-started-with-python#introduction</a>) and I got that error when I appended \db on the main app but it works with the localhost.</p>

<pre><code>Environment:


Request Method: GET
Request URL: https://&lt;appname&gt;.herokuapp.com/db

Django Version: 1.9.2
Python Version: 2.7.11
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'hello')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')



Traceback:

File "/app/.heroku/python/lib/python2.7/site- packages/django/core/handlers/base.py" in get_response
  149.                     response = self.process_exception_by_middleware(e, request)

File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  147.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/app/hello/views.py" in db
  17.     greeting.save()

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py" in save
  700.                        force_update=force_update, update_fields=update_fields)

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py" in save_base
  728.             updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py" in _save_table
  812.             result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py" in _do_insert
  851.                                using=using, raw=raw)

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method
  122.                 return getattr(self.get_queryset(), name)(*args, **kwargs)

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/query.py" in _insert
  1039.         return query.get_compiler(using=using).execute_sql(return_id)

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
  1060.                 cursor.execute(sql, params)

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
  79.             return super(CursorDebugWrapper, self).execute(sql, params)

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
  64.                 return self.cursor.execute(sql, params)

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/utils.py" in __exit__
  95.                 six.reraise(dj_exc_type, dj_exc_value, traceback)

File "/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
  64.                 return self.cursor.execute(sql, params)

Exception Type: ProgrammingError at /db
Exception Value: relation "hello_greeting" does not exist
LINE 1: INSERT INTO "hello_greeting" ("when") VALUES ('2016-09-25T17...
                ^ 
</code></pre>

<p>Thank you for your help.</p>

<p>Sorry, my mistake. I was not able to migrate thus the issue was solved using</p>

<pre><code>heroku run python manage.py migrate
</code></pre>

python heroku