help me out

59 views
Skip to first unread message

Umar Kambala

unread,
May 24, 2018, 10:33:11 AM5/24/18
to django...@googlegroups.com
please help me, this is the error mgs am been getting whenever i run my manage.py runserver

Not Found: /
[24/May/2018 14:16:40] "GET / HTTP/1.1" 404 2027
Internal Server Error: /polls/
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\exception.py", line 35, in inner
    response = get_response(request)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\base.py", line 158, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\base.py", line 156, in _get_response
    response = response.render()
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\response.py", line 106, in render
    self.content = self.rendered_content
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\response.py", line 81, in rendered_content
    template = self.resolve_template(self.template_name)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\response.py", line 63, in resolve_template
    return select_template(template, using=self.using)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\loader.py", line 47, in select_template
    raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
django.template.exceptions.TemplateDoesNotExist: polls/index.html, polls/question_list.html
[24/May/2018 14:16:52] "GET /polls/ HTTP/1.1" 500 79698
Not Found: /favicon.ico
[24/May/2018 14:17:54] "GET /favicon.ico HTTP/1.1" 404 2078

i dont know were the problem is

Gerardo Palazuelos

unread,
May 24, 2018, 10:41:36 AM5/24/18
to django...@googlegroups.com
Hi
Your problem is this (quiten in last part of the error stack):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\template\loader.py", line 47, in select_template
raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
django.template.exceptions.TemplateDoesNotExist: polls/index.html, polls/question_list.html


You have an issue with your templates and where are they located.

Regards,

--
Gerardo Palazuelos Guerrero

Umar Kambala

unread,
May 24, 2018, 11:29:40 AM5/24/18
to django...@googlegroups.com

It is located in mysite/polls/template/polls/

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
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/7002A588-CF73-4FC9-B385-54BB5762F112%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Melvyn Sopacua

unread,
May 24, 2018, 12:56:20 PM5/24/18
to django...@googlegroups.com
On donderdag 24 mei 2018 17:28:53 CEST Umar Kambala wrote:
> It is located in mysite/polls/template/polls/

It should be in mysite/polls/templates/polls/

Note: templates with an s, not template.

--
Melvyn Sopacua

Umar Kambala

unread,
May 24, 2018, 1:37:11 PM5/24/18
to django...@googlegroups.com

Thanks very much, will try it n get back to u

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Umar Kambala

unread,
May 27, 2018, 5:33:41 AM5/27/18
to django...@googlegroups.com

Good day
Plz I have a problem, on mysite I have the following mysite/personal/templates/personal but wen I runserver it gives me "NameError: name 'template' is not define.. Please can u help me locate the problem? Thank u

On May 24, 2018 4:56 PM, "Melvyn Sopacua" <m.r.s...@gmail.com> wrote:
--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Aristeidis Almpanis

unread,
May 27, 2018, 3:02:15 PM5/27/18
to django...@googlegroups.com
Good day,

Please be more careful when asking a question and provide more details. For example include in your email all the python traceback info.

From the error you described: "NameError: name 'template' is not defined" it seems that you are referring to a "template" variable in your code that is never set to a value (it is not defined).

You can also tell us more about which tutorial you are trying to do so we can refer to the code - or include your code to the email.

AA

Reply all
Reply to author
Forward
0 new messages