Django bugfix release: 2.0.6

29 views
Skip to first unread message

Carlton Gibson

unread,
Jun 1, 2018, 12:22:26 PM6/1/18
to Django users
Details are available on the Django project weblog: 

Umar Kambala

unread,
Jun 3, 2018, 6:21:39 AM6/3/18
to django...@googlegroups.com

Please I have a problem, after successfully going through the django polls and having results, and now wans to run a tuturial on a web development, wen I  runserver I gets errors. I don't really understand where the problem is. The problem is "NameError:name 'template' is not defined"

On Jun 1, 2018 4:22 PM, "Carlton Gibson" <carlton...@gmail.com> wrote:
Details are available on the Django project weblog: 

--
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/7d59d8c3-cc5b-4ecc-ac23-ce1fcb64d5ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

刘家伟

unread,
Jun 3, 2018, 7:37:52 AM6/3/18
to django...@googlegroups.com
Django need template dir to store your html ,so in the setting.py , you shuold set the template dir like this:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'template')]
,
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
and  it is in root path of your project

Umar Kambala

unread,
Jun 4, 2018, 5:01:53 AM6/4/18
to django...@googlegroups.com

Thanks for the help,
After making that corrections, I have another error which is

'APP_DIRS': True,
SyntaxError: invalid syntax
Need more help

Reply all
Reply to author
Forward
0 new messages