Hello everyone, I have been using Heroku to try and deploy my Django site.
When running the command 'heroku open' Django gives me this error


Environment:


Request Method: GET
Request URL: https://secure-waters-81472.herokuapp.com/

Django Version: 2.0
Python Version: 3.6.6
Installed Applications:
['polls.apps.PollsConfig',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles']
Installed Middleware:
('whitenoise.middleware.WhiteNoiseMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Template error:
In template /app/polls/templates/polls/home.html, error at line 6
   relation "polls_article" does not exist
LINE 1: ..._article"."body", "polls_article"."pub_date" FROM "polls_art...
                                                             ^

   1 : {% load static %}
   2 : <link rel="stylesheet" type="text/css" href="{% static
'polls/home_style.css' %}"/>
   3 :
   4 : <font color="white"><center><h1>Home</h1>
   5 :
   6 :  {% for article in object_list %}
   7 :     <font color="white"><h2>{{ article.headline }}</h2>
   8 : <!--this attribute may need tweaking in the future-->
   9 : <font color="white"><p style="margin-left: 320px; margin-right:
300px" >{{article.body}}</p>
   10 : {% empty %}
   11 :     <li>No articles yet.</li>
   12 : {% endfor %}
   13 :
   14 : </center>
   15 :
   16 :


Traceback:

File
"/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py"
in _execute
  85.                 return self.cursor.execute(sql, params)

The above exception (relation "polls_article" does not exist
LINE 1: ..._article"."body", "polls_article"."pub_date" FROM "polls_art...
                                                             ^
) was the direct cause of the following exception:

File
"/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py"
in inner
  35.             response = get_response(request)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py"
in _get_response
  158.                 response = self.process_exception_by_middleware(e,
request)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py"
in _get_response
  156.                 response = response.render()

File
"/app/.heroku/python/lib/python3.6/site-packages/django/template/response.py"
in render
  106.             self.content = self.rendered_content

File
"/app/.heroku/python/lib/python3.6/site-packages/django/template/response.py"
in rendered_content
  83.         content = template.render(context, self._request)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/template/backends/django.py"
in render
  61.             return self.template.render(context)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
in render
  175.                     return self._render(context)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
in _render
  167.         return self.nodelist.render(context)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
in render
  943.                 bit = node.render_annotated(context)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/template/base.py"
in render_annotated
  910.             return self.render(context)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/template/defaulttags.py"
in render
  168.             len_values = len(values)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py"
in __len__
  254.         self._fetch_all()

File
"/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py"
in _fetch_all
  1179.             self._result_cache = list(self._iterable_class(self))

File
"/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py"
in __iter__
  54.         results =
compiler.execute_sql(chunked_fetch=self.chunked_fetch,
chunk_size=self.chunk_size)

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

File
"/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py"
in execute
  100.             return super().execute(sql, params)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py"
in execute
  68.         return self._execute_with_wrappers(sql, params, many=False,
executor=self._execute)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py"
in _execute_with_wrappers
  77.         return executor(sql, params, many, context)

File
"/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py"
in _execute
  85.                 return self.cursor.execute(sql, params)

File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py"
in __exit__
  89.                 raise dj_exc_value.with_traceback(traceback) from
exc_value

File
"/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py"
in _execute
  85.                 return self.cursor.execute(sql, params)

Exception Type: ProgrammingError at /
Exception Value: relation "polls_article" does not exist
LINE 1: ..._article"."body", "polls_article"."pub_date" FROM "polls_art...
                                                             ^



I have been at this for days....Any help would be hugely appreciated. Thank
you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAADJOY%2B6rWS-02LPM1BW71dmrWk8hBPgn4TDsiwFLe%2BoC4MHzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to