Supported tags

From NDjango
Jump to: navigation, search

The full set of NDjango tags has been implemented, except where not applicable to a .NET environment:

autoescape
implemented see django autoescape
block
implemented see django block
comment
implemented see django comment
cycle
implemented see django cycle
debug
implemented. NDjango debug tag generates a list of variables defined in the current context with their values. Variable values are determined by calling ToString() method on the variable. The output also includes current values of the context settings as well as the result of the call to the ToString() method on the external context method passed to the renderTemplate() method. see also django debug
extends
implemented see Template Loader
filter
implemented see django filter
firstof
implemented see django firstof
for
implemented see django for
for ... empty
implemented see django for...empty
if
implemented with some differences in how the conditional expression is parsed. The standard Django implementation treats a and b c d to be the same as a and b and c and d we think this is a malformed expression. On the other hand we treat and and or as a valid expression with variables and and or and'ed together.
Since NDjango 0.9.9.9 you can use '>', '<' , '==', '!=', 'and', 'or' in the conditional expressions(so called 'smart' if tag,there is no special need to use ifequal and ifnotequal tags no more...)
See also django if
ifchange
implemented see django ifchanged
ifequal
implemented see django ifequal
ifnotequal
implemented see django ifnotequal
include
implemented see Template Loader
load
not implemented. The load tag makes less sense in .net than it does in Python. Allowing a template to explicitly load a library (or assembly in .net parlance) is a potential security risk, and there are other mechanisms of doing so.
model
specific for NDjango (there is no analog in django). Tag has 1 argument <model_alias>:<namespace>.<class>. You can use <model_alias>(for example, 'Model') in the template's body to reference its public members.Note you should specify not just class name,but the name of the namespace too for the Intellisense to be available.
now
partially implemented. Date formatting is done by mapping the django date formatting elements to .net date formatting elements. Django formatting elements without direct mapping are not currently implemented.
regroup
implemented see django regroup
spaceless
implemented see django spaceless
ssi
implemented see Template Loader
templatetag
implemented see django templatetag
url
implemented, with differences. see django url. Since the interpretation of the URL tag is controller framework-specific, that logic is delegated to the respective integration projects. Please see Integrating for more information.
For Bistro integration, a leading "/" coming from the controllers is interpreted as absolute, whereas if specified in an NDjango template, a leading "/" is interpreted as relative to the base URL.
widthratio
implemented see django widthratio
with
implemented see django with