banner



Invalid Block Tag On Line 11: 'form.errors'. Did You Forget To Register Or Load This Tag?

Welcome to the Treehouse Community

The Treehouse Customs is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Interact here on code errors or bugs that you need feedback on, or asking for an actress gear up of eyes on your latest project. Bring together thousands of Treehouse students and alumni in the customs today. (Note: But Treehouse students can comment or inquire questions, but non-students are welcome to browse our conversations.)

Looking to acquire something new?

Treehouse offers a seven twenty-four hours free trial for new students. Get access to thousands of hours of content and a supportive customs. Beginning your complimentary trial today.

Greg Kaleka

TemplateSyntaxError at / Invalid cake tag on line 9: 'static'. Did you forget to register or load this tag?

Not sure why I'thousand getting this mistake. My lawmaking is identical to Kenneth's, except that I used a list instead of tuple for STATICFILES_DIRS, considering I'k using a newer version of Django.

I'm using my local surroundings rather than Workspaces.

Here are only the pertinent parts of my files for this lesson:

settings.py

                                                  STATIC_URL                  =                  '/static/'                                                  STATICFILES_DIRS                  =                  [                                                  os                  .                  path                  .                  bring together                  (                  BASE_DIR                  ,                  'assets'                  ),                                                  ]                              

urls.py

                                                  urlpatterns                  =                  [                                                  url                  (                  r                  '^courses/'                  ,                  include                  (                  'courses.urls'                  )),                                                  url                  (                  r                  '^admin/'                  ,                  admin                  .                  site                  .                  urls                  ),                                                  url                  (                  r                  '^$'                  ,                  views                  .                  homepage                  ),                                                  ]                                                                                  urlpatterns                  +=                  staticfiles_urlpatterns                  ()                              

layout.html

                                %{ load static from staticfiles %}                                                                                  <!doctype html>                                                  <                  html                  lang                  =                  "en"                  >                                                  <                  head                  >                                                  <                  meta                  charset                  =                  "utf-eight"                  >                                                  <                  meta                  proper name                  =                  "viewport"                  content                  =                  "width=device-width, initial-scale=i"                  >                                                  <                  title                  >{% block title %}{% endblock %}</                  title                  >                                                  <                  link                  rel                  =                  "stylesheet"                  blazon                  =                  "text/css"                  href                  =                  "{% static 'css/layout.css' %}"                  >                              

ane Answer

Ryan S

Hi Greg,

In layout.html on line 1, it seems you take the wrong syntax for the opening template tag. You have %{ when information technology should be {%.

This is causing the template error on line 9 because the static template tag hasn't been successfully loaded.

Invalid Block Tag On Line 11: 'form.errors'. Did You Forget To Register Or Load This Tag?,

Source: https://teamtreehouse.com/community/templatesyntaxerror-at-invalid-block-tag-on-line-9-static-did-you-forget-to-register-or-load-this-tag

Posted by: staggstholl1948.blogspot.com

0 Response to "Invalid Block Tag On Line 11: 'form.errors'. Did You Forget To Register Or Load This Tag?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel