Thank you, x13 and creecode! On Tue, Apr 27, 2010 at 2:04 PM, x13 <[email protected]> wrote:
> > Did you read the tutorial? > http://docs.djangoproject.com/en/1.1/topics/templates/#topics-templates > > Seems to be a syntax problem > > It's not > > {{ block dtd }} ....... {{ endblock dtd }} > > the properly syntax (for last Django version) would be: > > {% block dtd %} ....... {% endblock %} > > Notice you should not include 'dtd' in the endblock tag. > > -f > > > > > > > On Apr 27, 3:51 pm, Jonathan Hayward > <[email protected]> wrote: > > I'm working on a base template. Django is giving a TemplateSyntaxError at > my > > first attempted block declaration: > > > > TemplateSyntaxError at / > > > > Could not parse the remainder: ' dtd' from 'block dtd' > > > > Request Method:GETRequest URL:http://linux:8888/ExceptionType: > > TemplateSyntaxErrorException Value: > > > > Could not parse the remainder: ' dtd' from 'block dtd' > > > > Have I overgeneralized where blocks are appropriate, or is "dtd" > something > > like a reserved word here? > > > > The template is: > > > > {{ block dtd }}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " > http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">{{ endblock dtd }} > > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > > {{ block head }}<head> > > <title>{{ block title }}{{ page.title }}{{ endblock title > }}</title> > > {{ block head_favicon }}<link rel="icon" > href="/static/favicon.ico" > > type="x-icon" /> > > <link rel="shortcut icon" href="/static/favicon.ico" > type="x-icon" > > />{{ endblock head_favicon }} > > {{ block head_meta }} > > {{ block head_meta_author}}{{ endblock head_meta_author }} > > {{ block head_meta_charset }}<meta http-equiv="Content-Type" > > content="text/html; charset=UTF-8" />{{ endblock head_meta_charset }} > > {{ block head_meta_contentlanguage }}<meta > > http-equiv="Content-Language" value="en-US" />{{ endblock > > head_meta_contentlanguage }} > > {{ block head_meta_description }}{{ endblock > > head_meta_description }} > > {{ block head_meta_keywords }}{{ endblock head_meta_keywords > }} > > {{ block head_meta_othertags }}{{ endblock > head_meta_othertags}} > > > > {{ block head_meta_refresh }}{{ endblock head_meta_refresh }} > > {{ block head_meta_robots }}{{ endblock head_meta_robots }} > > {{ endblock head_meta }} > > {{ block head_rss }}{{ endblock head_rss }} > > {{ block head_css }} > > {{ block head_css_site }}<link rel="stylesheet" > type="text/css" > > href="/static/css/style.css" />{{endblock head_css_site }} > > {{ block head_css_section }}{{ endblock head_css_section }} > > {{ block head_css_page }}{{ endblock head_css_page }} > > {{ endblock head_css }} > > {{ block head_section }}{{ endblock head_section }} > > {{ block head_page }}{{ endblock head_page }} > > </head>{{ endblock head }} > > {{ block body }}<body> > > <div id="sidebar"> > > {{ block body_sidebar }}{{ endblock body_sidebar }} > > </div> > > <div id="content"> > > {{ block body_content }} > > <div id="header"> > > {{ block body_header }} > > {{ block body_header_banner }}{{ endblock > body_header_banner}} > > > > {{ block body_header_title }}<h1>{{ title }}</h1>{{ > endblock > > body_header_title }} > > {{ block body_header_breadcrumb }}{{ > > endblock body_header_breadcrumb }} > > {{ endblock body_header }} > > </div> > > {{ block body_announcements }}{{ endblock body_announcements > }} > > {{ block body_main }}{{ endblock body_main }} > > {{ endblock body_content }} > > </div> <div id="footer"> {{ block body_footer }} > > {{ block body_footer_breadcrumb }}{{ page.breadcrumb }}{{ endblock > > body_header_breadcrumb }} > > {{ block body_footer_legal }}{{ endblock body_footer_legal }} > > {{ endblock body_footer }} > > </div> </body>{{ endblock body }} {{ block footer }} > {{ > > block footer_javascript }} {{ block > footer_javascript_site}}<script language="JavaScript" > type="text/javascript" > > > > src="/static/js/jquery.js"></script>{{ endblock > > footer_javascript_site }} {{ block > footer_javascript_section}}{{ endblock > > > > footer_javascript_section }} {{ block footer_javascript_page > }}{{ > > endblock > > footer_javascript_page }} > > {{ endblock footer_javascript }} > > {{ endblock footer }} > > </html> > > > > -- > > → Jonathan Hayward, [email protected] > > → An Orthodox Christian author: theology, literature, et cetera. > > → My award-winning collection is available for free reading online: > > ☩ I invite you to visit my main site athttp://JonathansCorner.com/ > > > > -- > > You received this message because you are subscribed to the Google Groups > "Django users" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > [email protected]<django-users%[email protected]> > . > > For more options, visit this group athttp:// > groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<django-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- → Jonathan Hayward, [email protected] → An Orthodox Christian author: theology, literature, et cetera. → My award-winning collection is available for free reading online: ☩ I invite you to visit my main site at http://JonathansCorner.com/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

