﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35937	Refactor very similar code of internal dec function for simple_tag, simple_block_tag and inclusion_tag	Emma Delescolle		"The internal `dec` function used by `simple_tag`, `simple_block_tag` and `inclusion_tag` are **very** similar. There are also similarities in the process of determining the return value of these methods (the decorated function or the decorator itself). These similarities should be refactored.

- https://github.com/django/django/blob/main/django/template/library.py#L111
- https://github.com/django/django/blob/main/django/template/library.py#L165
- https://github.com/django/django/blob/main/django/template/library.py#L250

Refactoring this function to be either a method of the `Library` class they are defined in or as a completely separate function would:
- reduce the amount of code to maintain
- render change easier if anything ever has to change inside those
- allow the end-user to use that function/method to create their own complex template tags"	Cleanup/optimization	closed	Template system	dev	Normal	wontfix	decorator,tag,simple_tag	Emma Delescolle	Unreviewed	0	0	0	0	0	0
