Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

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-firstof snippet to snippets/django-snippets.json
  • Updated README.md documentation table

Usage

Type ptd-firstof in HTML templates to insert:

{% firstof var1 var2 %}

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 firstof tag</issue_title>
<issue_description>Add the firstof tag for Django.

Inspired by this tweet.</issue_description>

<agent_instructions>Add firstof tag 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.

Co-authored-by: EndlessTrax <17141891+EndlessTrax@users.noreply.github.com>
@EndlessTrax EndlessTrax marked this pull request as ready for review October 30, 2025 16:07
Copilot AI changed the title [WIP] Add Django firstof tag implementation Add Django firstof tag snippet Oct 30, 2025
@EndlessTrax EndlessTrax added the enhancement New feature or request label Oct 30, 2025
Copilot AI requested a review from EndlessTrax October 30, 2025 16:07
Copilot finished work on behalf of EndlessTrax October 30, 2025 16:07
@EndlessTrax EndlessTrax merged commit 62e3a8e into master Oct 30, 2025
@EndlessTrax EndlessTrax deleted the copilot/add-firstof-tag-to-django branch October 30, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Django firstof tag

2 participants