{"id":4752,"date":"2025-01-30T19:29:32","date_gmt":"2025-01-30T10:29:32","guid":{"rendered":"https:\/\/secondlife.lol\/?p=4752"},"modified":"2025-01-30T19:29:33","modified_gmt":"2025-01-30T10:29:33","slug":"django-templates-advanced-techniques","status":"publish","type":"post","link":"https:\/\/secondlife.lol\/en\/django-templates-advanced-techniques\/","title":{"rendered":"Django Templates Deeper: Advanced Features and Optimization Techniques"},"content":{"rendered":"<p class=\"wp-block-paragraph\">hello, <a href=\"https:\/\/www.djangoproject.com\/\" target=\"_blank\" rel=\"noopener\">Django<\/a> Hey developers, today we're talking about <a href=\"https:\/\/secondlife.lol\/en\/django-templates-basics-for-beginners\/\">Fundamentals<\/a>You're familiar with the basics of using templates, but now it's time to take it to the next level, use them more efficiently, and make your projects more powerful. Are you ready to take your Django skills to the next level? Let's get started!<\/p>\n\n\n<style>.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title-wrap{padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title-wrap{color:var(--global-palette2, #2B6CB0);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{color:var(--global-palette2, #2B6CB0);font-size:28px;font-weight:regular;font-style:normal;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap .kb-table-of-content-list{color:var(--global-palette1, #3182CE);line-height:2em;font-weight:regular;font-style:normal;margin-top:var(--global-kb-spacing-sm, 1.5rem);margin-right:0px;margin-bottom:0px;margin-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap .kb-table-of-content-list .kb-table-of-contents__entry:hover{color:var(--global-palette6, #718096);}@media all and (max-width: 1024px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);}}@media all and (max-width: 1024px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{font-size:28px;}}@media all and (max-width: 767px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{font-size:28px;}}<\/style>\n\n\n<h2 class=\"wp-block-heading\">Django Templates in Depth - Template Inheritance<\/h2>\n\n\n<style>.kb-image4752_39ea4c-81 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image4752_39ea4c-81\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"600\" height=\"387\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-10-600x387.jpg\" alt=\"\" class=\"kb-img wp-image-4777\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-10-600x387.jpg 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-10-300x193.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-10-768x495.jpg 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-10-18x12.jpg 18w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-10.jpg 881w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">One of the most powerful features of Django Templates is the <strong>Template inheritance<\/strong>This helps reduce code duplication and maintain a consistent layout.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Create a basic template<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First, create a <code>base.html<\/code>Let's create a basic template called<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;ko&quot;&gt;\n&lt;!-- HTML5 \ubb38\uc11c\uc758 \uc2dc\uc791\uc744 \uc120\uc5b8\ud558\uace0, \uc8fc \uc5b8\uc5b4\ub97c \ud55c\uad6d\uc5b4\ub85c \uc9c0\uc815 --&gt;\n\n&lt;head&gt;\n    &lt;meta charset=&quot;UTF-8&quot;&gt;\n    &lt;!-- \ubb38\uc11c\uc758 \ubb38\uc790 \uc778\ucf54\ub529\uc744 UTF-8\ub85c \uc124\uc815 --&gt;\n    &lt;title&gt;{% block title %}My Django Site{% endblock %}&lt;\/title&gt;\n    &lt;!-- \ud398\uc774\uc9c0 \uc81c\ubaa9\uc744 \uc704\ud55c \ube14\ub85d. \uc790\uc2dd \ud15c\ud50c\ub9bf\uc5d0\uc11c \uc7ac\uc815\uc758 \uac00\ub2a5 --&gt;\n    {% block extra_head %}{% endblock %}\n    &lt;!-- \ucd94\uac00\uc801\uc778 head \uc694\uc18c\ub97c \uc704\ud55c \ube48 \ube14\ub85d. \ud544\uc694\uc2dc \uc790\uc2dd \ud15c\ud50c\ub9bf\uc5d0\uc11c \ub0b4\uc6a9 \ucd94\uac00 \uac00\ub2a5 --&gt;\n&lt;\/head&gt;\n\n&lt;body&gt;\n    &lt;header&gt;\n        {% block header %}\n        &lt;h1&gt;Welcome to My Site&lt;\/h1&gt;\n        {% endblock %}\n        &lt;!-- \ud5e4\ub354 \uc139\uc158\uc744 \uc704\ud55c \ube14\ub85d. \uae30\ubcf8 \ud658\uc601 \uba54\uc2dc\uc9c0 \ud3ec\ud568. \uc790\uc2dd \ud15c\ud50c\ub9bf\uc5d0\uc11c \ubcc0\uacbd \uac00\ub2a5 --&gt;\n    &lt;\/header&gt;\n\n    &lt;main&gt;\n        {% block content %}\n        {% endblock %}\n        &lt;!-- \uba54\uc778 \ucf58\ud150\uce20\ub97c \uc704\ud55c \ube48 \ube14\ub85d. \uac01 \ud398\uc774\uc9c0\uc758 \uc8fc\uc694 \ub0b4\uc6a9\uc774 \uc5ec\uae30\uc5d0 \ub4e4\uc5b4\uac10 --&gt;\n    &lt;\/main&gt;\n\n    &lt;footer&gt;\n        {% block footer %}\n        &lt;p&gt;&copy; 2025 My Django Site&lt;\/p&gt;\n        {% endblock %}\n        &lt;!-- \ud478\ud130 \uc139\uc158\uc744 \uc704\ud55c \ube14\ub85d. \uae30\ubcf8 \uc800\uc791\uad8c \uc815\ubcf4 \ud3ec\ud568. \uc790\uc2dd \ud15c\ud50c\ub9bf\uc5d0\uc11c \uc218\uc815 \uac00\ub2a5 --&gt;\n    &lt;\/footer&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Using template inheritance<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, this default template (<code>base.html<\/code>) to create a new page.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% extends &quot;base.html&quot; %}\n&lt;!-- base.html \ud15c\ud50c\ub9bf\uc744 \uc0c1\uc18d\ubc1b\uc74c\uc744 \uc120\uc5b8 --&gt;\n\n{% block title %}Welcome Page{% endblock %}\n&lt;!-- base.html\uc758 title \ube14\ub85d\uc744 &quot;Welcome Page&quot;\ub85c \ub300\uccb4 --&gt;\n\n{% block content %}\n&lt;h2&gt;Welcome!&lt;\/h2&gt;\n&lt;p&gt;This page was created using Django Template inheritance.&lt;\/p&gt;\n{% endblock %}\n&lt;!-- base.html\uc758 content \ube14\ub85d\uc5d0 \uc0c8\ub85c\uc6b4 \ub0b4\uc6a9\uc744 \ucd94\uac00 --&gt;\n\n{% block extra_head %}\n&lt;style&gt;\n    h2 { color: #007bff; }\n&lt;\/style&gt;\n{% endblock %}\n&lt;!-- base.html\uc758 extra_head \ube14\ub85d\uc5d0 CSS \uc2a4\ud0c0\uc77c\uc744 \ucd94\uac00 --&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This way, you can keep the basic structure and only modify what you need to, which is really handy, right?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create custom template tags and filters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Not satisfied with the default tags and filters Django provides? Don't worry. We can create our own!<\/p>\n\n\n<style>.kb-image4752_650c14-27 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image4752_650c14-27\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"600\" height=\"327\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-11-600x327.jpg\" alt=\"\" class=\"kb-img wp-image-4779\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-11-600x327.jpg 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-11-300x163.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-11-768x418.jpg 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-11-18x10.jpg 18w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-11.jpg 876w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Create a custom filter<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First, create a <code>myapp\/templatetags\/custom_filters.py<\/code> file and write something like this<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from django import template # Import Django's template module\n\nregister = template.Library() # Create a new template tag library\n\nregister.filter # Register the add_exclamation function as a template filter\ndef add_exclamation(value):\n    return f\"{value}!\"  # Add an exclamation point after a given value\n\n@register.filter(name='multiply') # Register the multiply_by function as a filter named 'multiply'\ndef multiply_by(value, arg):\n    return value * arg # Multiplies the given value by the number received as argument\n\nExample of using #:\n# {{ \"Hello\"|add_exclamation }}  -&gt; output: Hello!\n# {{ 5|multiply:3 }}  -&gt; output: 15\n\n# Note: To use this file, save it to your app's templatetags folder,\n# template, and load it as {% load filename %}.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now you can use this in your template:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% load custom_filters %}\n&lt;!-- custom_filters.py \ud30c\uc77c\uc5d0 \uc815\uc758\ub41c \ucee4\uc2a4\ud140 \ud544\ud130\ub4e4\uc744 \ub85c\ub4dc\ud569\ub2c8\ub2e4. --&gt;\n\n&lt;p&gt;{{ &quot;Hello&quot;|add_exclamation }}&lt;\/p&gt;\n&lt;!-- &quot;Hello&quot; \ubb38\uc790\uc5f4\uc5d0 add_exclamation \ud544\ud130\ub97c \uc801\uc6a9\ud569\ub2c8\ub2e4. \n     \uacb0\uacfc: &lt;p&gt;Hello!&lt;\/p&gt; --&gt;\n\n&lt;p&gt;{{ 5|multiply:3 }}&lt;\/p&gt;\n&lt;!-- \uc22b\uc790 5\uc5d0 multiply \ud544\ud130\ub97c \uc801\uc6a9\ud558\uace0 \uc778\uc790\ub85c 3\uc744 \uc804\ub2ec\ud569\ub2c8\ub2e4. \n     \uacb0\uacfc: &lt;p&gt;15&lt;\/p&gt; --&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Create a custom tag<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Creating tags isn't hard either. <code>myapp\/templatetags\/custom_tags.py<\/code> file and open it,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from django import template\nImport the template module from # Django.\n\nfrom django.utils.safestring import mark_safe\n# Imports the mark_safe function for rendering HTML safely.\n\nregister = template.Library()\n# Create a new template tag library.\n\n@register.simple_tag\n# Register the bootstrap_alert function as simple_tag.\ndef bootstrap_alert(message, alert_type='info'):\n    # message: Message to display in the alert.\n    # alert_type: type of alert (defaults to 'info')\n    return mark_safe(f'&lt;div class=&quot;alert alert-{alert_type}&quot;&gt;{message}&lt;\/div&gt;')\n    1Create a notification div in the style of TP5T Bootstrap, and mark it as safe HTML using mark_safe.\n\nExample of using #:\n# {% bootstrap_alert &quot;Attention!&quot; &quot;warning&quot; %}\n# Output: &lt;div class=&quot;alert alert-warning&quot;&gt;Attention!&lt;\/div&gt;\n\n# Caution: To use this file, save it to the templatetags folder in your app,\n# template, and load it as {% load filename %}.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In a template, you can use it like this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% load custom_tags %}\n&lt;!-- custom_tags.py \ud30c\uc77c\uc5d0 \uc815\uc758\ub41c \ucee4\uc2a4\ud140 \ud0dc\uadf8\ub4e4\uc744 \ub85c\ub4dc\ud569\ub2c8\ub2e4. --&gt;\n\n{% bootstrap_alert &quot;Beware!&quot; &quot;warning&quot; %}\n&lt;!-- bootstrap_alert \ucee4\uc2a4\ud140 \ud0dc\uadf8\ub97c \ud638\ucd9c\ud569\ub2c8\ub2e4.\n     \uccab \ubc88\uc9f8 \uc778\uc790 &quot;\uc8fc\uc758\ud558\uc138\uc694!&quot;\ub294 \uc54c\ub9bc\uc5d0 \ud45c\uc2dc\ub420 \uba54\uc2dc\uc9c0\uc785\ub2c8\ub2e4.\n     \ub450 \ubc88\uc9f8 \uc778\uc790 &quot;warning&quot;\uc740 \uc54c\ub9bc\uc758 \uc720\ud615\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n     \n     \uc774 \ud0dc\uadf8\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 HTML\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4:\n     &lt;div class=&quot;alert alert-warning&quot;&gt;\uc8fc\uc758\ud558\uc138\uc694!&lt;\/div&gt;\n--&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Template optimization techniques<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are ways to improve performance when using Django Templates, and here are a few tips.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Caching template fragments<\/strong>: Caching parts that don't change often is a good idea.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>{% load cache %}\n{# load cache template tag library #}\n\n{% cache 500 sidebar %}\n{# cache internal content with name 'sidebar' for 500 seconds #}\n{# During the cache period, subsequent requests will use the saved version to improve performance #}\n\n    <!-- What to cache -->\n    {# This is where you put the template code that you actually want to cache #}\n    {# Example: Database query results, complex calculations, etc. #}\n\n{% endcache %}\n{# Indicates the end of the cache block #}<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Remove unnecessary context variables<\/strong>: <code>with<\/code> tag to simplify complex variables.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>{% with total=business.employees.count %}\n{% comment %}\nUse the with tag to assign the result of business.employees.count to the total variable\nThis is useful when you want to run a complex calculation or database query only once and reuse the results\n{% endcomment %}\n\n    {{ total }} employee{{ total|pluralize }}\n    {# Print the value of the total variable #}\n    {# Use the pluralize filter to add an 's' if total is greater than 1 #}\n    {# Example: 1 employee, 2 employees, 0 employees #}\n\n{% endwith %}\n{# with Indicates the end of the block. The total variable cannot be used after this #}<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Minimize database queries<\/strong>: Be careful when using iterations in templates - process data in the view beforehand if possible.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Security considerations<\/h2>\n\n\n<style>.kb-image4752_d9ee05-ca .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image4752_d9ee05-ca\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"600\" height=\"351\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-12-600x351.jpg\" alt=\"\" class=\"kb-img wp-image-4781\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-12-600x351.jpg 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-12-300x176.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-12-768x449.jpg 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-12-18x12.jpg 18w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/image-16-12.jpg 880w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Django Templates automatically escape by default to prevent XSS attacks, but the <code>safe<\/code> Use caution when using filters.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ user_input|safe }}  <!-- Caution: outputs user input as is --><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Finalize<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We've dived into the depths of Django Templates, but what did you think? Template inheritance, custom tags and filters, and optimization techniques. With these features, you'll be able to create more powerful and efficient Django applications. Keep experimenting and practicing. We hope you enjoyed learning about the advanced features of Django Templates, and that your Django projects are about to get even better. Go for it!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"># Glossary<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Template inheritance<\/strong>A technique for creating a base template and extending it in other templates.<\/li>\n\n\n\n<li><strong>Custom tags\/filters<\/strong>Template tags or filters created by the developer<\/li>\n\n\n\n<li><strong>Context<\/strong>: A set of variables passed to the template<\/li>\n\n\n\n<li><strong>Escape<\/strong>Techniques to prevent XSS attacks by converting special characters to HTML entities<\/li>\n\n\n\n<li><strong>Caching<\/strong>A technique for pre-storing frequently used data to improve performance<\/li>\n<\/ul>\n\n\n<style>.kb-image4457_249bea-0c.kb-image-is-ratio-size, .kb-image4457_249bea-0c .kb-image-is-ratio-size{max-width:300px;width:100%;}.wp-block-kadence-column > .kt-inside-inner-col > .kb-image4457_249bea-0c.kb-image-is-ratio-size, .wp-block-kadence-column > .kt-inside-inner-col > .kb-image4457_249bea-0c .kb-image-is-ratio-size{align-self:unset;}.kb-image4457_249bea-0c figure{max-width:300px;}.kb-image4457_249bea-0c .image-is-svg, .kb-image4457_249bea-0c .image-is-svg img{width:100%;}.kb-image4457_249bea-0c .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image4457_249bea-0c\"><figure class=\"aligncenter size-medium\"><img decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-300x300.webp\" alt=\"\ud14c\ub9ac \uc774\ubaa8\ud2f0\ucf58\" class=\"kb-img wp-image-4456\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-300x300.webp 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-600x600.webp 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-150x150.webp 150w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-768x768.webp 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-12x12.webp 12w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding.webp 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><figcaption><strong>(Happy coding!)<\/strong><\/figcaption><\/figure><\/div>","protected":false},"excerpt":{"rendered":"<p>\uc548\ub155\ud558\uc138\uc694, Django \uac1c\ubc1c\uc790 \uc5ec\ub7ec\ubd84! \uc624\ub298\uc740 \uae30\ucd08\uc5d0 \uc774\uc5b4\uc11c Django Templates \uc2ec\ud654&#8230;<\/p>","protected":false},"author":3,"featured_media":4783,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[3],"tags":[812,837,722,106,836],"class_list":["post-4752","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-coding","tag-django","tag-837","tag-722","tag-106","tag-836"],"taxonomy_info":{"category":[{"value":3,"label":"\ud30c\uc774\uc36c(Python)"}],"post_tag":[{"value":812,"label":"Django"},{"value":837,"label":"\uace0\uae09 \uae30\ub2a5"},{"value":722,"label":"\uc6f9 \uac1c\ubc1c"},{"value":106,"label":"\ucd5c\uc801\ud654"},{"value":836,"label":"\ud15c\ud50c\ub9bf"}]},"featured_image_src_large":["https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/Django-Templates-\uc2ec\ud654-\ud3ec\uc2a4\ud2b8-\uc378\ub124\uc77c-600x600.jpg",600,600,true],"author_info":{"display_name":"TERE","author_link":"https:\/\/secondlife.lol\/en\/author\/tere\/"},"comment_info":0,"category_info":[{"term_id":3,"name":"\ud30c\uc774\uc36c(Python)","slug":"python-coding","term_group":0,"term_taxonomy_id":3,"taxonomy":"category","description":"","parent":20,"count":119,"filter":"raw","cat_ID":3,"category_count":119,"category_description":"","cat_name":"\ud30c\uc774\uc36c(Python)","category_nicename":"python-coding","category_parent":20}],"tag_info":[{"term_id":812,"name":"Django","slug":"django","term_group":0,"term_taxonomy_id":812,"taxonomy":"post_tag","description":"","parent":0,"count":10,"filter":"raw"},{"term_id":837,"name":"\uace0\uae09 \uae30\ub2a5","slug":"%ea%b3%a0%ea%b8%89-%ea%b8%b0%eb%8a%a5","term_group":0,"term_taxonomy_id":837,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":722,"name":"\uc6f9 \uac1c\ubc1c","slug":"%ec%9b%b9-%ea%b0%9c%eb%b0%9c","term_group":0,"term_taxonomy_id":722,"taxonomy":"post_tag","description":"","parent":0,"count":8,"filter":"raw"},{"term_id":106,"name":"\ucd5c\uc801\ud654","slug":"%ec%b5%9c%ec%a0%81%ed%99%94","term_group":0,"term_taxonomy_id":106,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"},{"term_id":836,"name":"\ud15c\ud50c\ub9bf","slug":"%ed%85%9c%ed%94%8c%eb%a6%bf","term_group":0,"term_taxonomy_id":836,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts\/4752","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/comments?post=4752"}],"version-history":[{"count":8,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts\/4752\/revisions"}],"predecessor-version":[{"id":4782,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts\/4752\/revisions\/4782"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/media\/4783"}],"wp:attachment":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/media?parent=4752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/categories?post=4752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/tags?post=4752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}