Add Django `firstof` tag snippet by Copilot · Pull Request #10 · EndlessTrax/python-template-snippets
Adds VS Code snippet for Django's firstof template tag, which outputs the first non-empty variable from a list of arguments.
Changes
- Added
ptd-firstofsnippet tosnippets/django-snippets.json - Updated README.md documentation table
Usage
Type ptd-firstof in HTML templates to insert:
Tab stops at $1 (first variable) and $2 (second variable) for quick input.
Original prompt
This section details on the original issue you should resolve
<issue_title>Add Django
firstoftag</issue_title>
<issue_description>Add thefirstoftag for Django.Inspired by this tweet.</issue_description>
<agent_instructions>Add
firstoftag to Django snippets</agent_instructions>Comments on the Issue (you are @copilot in this section)
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.