CjkCMS Tags
cjkcms.templatetags.cjkcms_tags
can_show_item
can_show_item(context, item_visibility: str) -> bool
Menu item visibility conditional on selection in cms_settings.AUTH_VISIBILITY_CHOICES
Source code in cjkcms/templatetags/cjkcms_tags.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
cjkcms_version
cjkcms_version() -> str
Returns version of the CjkCMS formatted as string YY:[M]M:[D]D. Note: the CjkCMS uses Calendar Versioning
Source code in cjkcms/templatetags/cjkcms_tags.py
57 58 59 60 61 |
|
define
define(val=None)
Allows defining a new variable in the template
Source code in cjkcms/templatetags/cjkcms_tags.py
277 278 279 280 |
|
is_advanced_setting
is_advanced_setting(obj: object) -> bool
Returns True if object passed as argument is of type CjkcmsAdvSettings
Source code in cjkcms/templatetags/cjkcms_tags.py
51 52 53 54 |
|
is_in_future
is_in_future(the_date)
Checks if given date or datetime is in future
Source code in cjkcms/templatetags/cjkcms_tags.py
283 284 285 286 287 288 289 290 291 292 |
|
link_display
link_display(context, text: str) -> str
Check for double-curly braces + user.username/first_name/last_name/first_last_name. If found, display as requested from user record
Source code in cjkcms/templatetags/cjkcms_tags.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
|
map_to_bootstrap_alert
map_to_bootstrap_alert(message_tag)
Converts a message level to a bootstrap 5 alert class
Source code in cjkcms/templatetags/cjkcms_tags.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
|
query_update
query_update(querydict, key=None, value=None)
Alters querydict (request.GET) by updating/adding/removing key to value
Source code in cjkcms/templatetags/cjkcms_tags.py
186 187 188 189 190 191 192 193 194 195 196 197 198 |
|