You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the default template fileform.html for django-comments-xtd package,
context is accessible; for example {{ field }}, {{ form.comment}}, {{form}} . Q1: Where is the context defined and why we use {{ field }}{{ form }} instead of {{ object }} by default ?
passed-in arguments to view function, such as request.user.is_authenticated. Q2: is the instance of HttpRequest (named request) part of the template context ? or template file has access to passed-in arguments natively ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
In the default template file
form.html
fordjango-comments-xtd
package,{{ field }}
,{{ form.comment}}
,{{form}}
.Q1: Where is the context defined and why we use
{{ field }}
{{ form }}
instead of{{ object }}
by default ?view
function, such asrequest.user.is_authenticated
.Q2: is the instance of
HttpRequest
(namedrequest
) part of the template context ? or template file has access to passed-in arguments natively ?Beta Was this translation helpful? Give feedback.
All reactions