Repository: hakib/django-admin-lightweight-date-hierarchy (language: python)

Issue:
(Django 4.1) Error templates.E003 during system check
* django-admin-lightweight-date-hierarchy version: 1.0.1
* Django version: 4.1
* Python version: 3.10.5
* Operating System: Windows 10

### Description

After updating Django to version 4.1, the system check procedure throws error templates.E003 because of duplicate "admin_list" template tag module.

### What I Did

command launched:

python manage.py runserver 8000

end of stacktrace:

django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
?: (templates.E003) 'admin_list' is used for multiple template tag modules: 'django.contrib.admin.templatetags.admin_list', 'django_admin_lightweight_date_hierarchy.templatetags.admin_list'

System check identified 1 issue (0 silenced).

Add option to provide custom drill down for any level in the date hie…
@bluetech take a look.


Discussion / hints:
Have you found a solution by any chance?
I temporarily solved the problem by removing `django_admin_lightweight_date_hierarchy` from the `INSTALLED_APPS` in the project settings and adding a custom template tag that calls the original function from the package:

```
from django import template
from django_admin_lightweight_date_hierarchy.templatetags.admin_list import date_hierarchy as default_date_hierarchy

register = template.Library()

@register.inclusion_tag('admin/date_hierarchy.html')
def date_hierarchy(cl):
    return default_date_hierarchy(cl)
```
# [Codecov](https://codecov.io/gh/hakib/django-admin-lightweight-date-hierarchy/pull/1?src=pr&el=h1) Report
> Merging [#1](https://codecov.io/gh/hakib/django-admin-lightweight-date-hierarchy/pull/1?src=pr&el=desc) into [master](https://codecov.io/gh/hakib/django-admin-lightweight-date-hierarchy/commit/2f214e4b14f040b876d5dffa8079b423a6431607?src=pr&el=desc) will **decrease** coverage by `0.43%`.
> The diff coverage is `84.61%`.

[![Impacted file tree graph](https://codecov.io/gh/hakib/django-admin-lightweight-date-hierarchy/pull/1/graphs/tree.svg?token=dp8VGfc2ij&src=pr&height=150&width=650)](https://codecov.io/gh/hakib/django-admin-lightweight-date-hierarchy/pull/1?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master       #1      +/-   ##
==========================================
- Coverage   81.03%   80.59%   -0.44%     
==========================================
  Files           3        3              
  Lines          58       67       +9     
  Branches       18       21       +3     
==========================================
+ Hits           47       54       +7     
- Misses          8        9       +1     
- Partials        3        4       +1
```


| [Impacted Files](https://codecov.io/gh/hakib/django-admin-lightweight-date-hierarchy/pull/1?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...htweight\_date\_hierarchy/templatetags/admin\_list.py](https://codecov.io/gh/hakib/django-admin-lightweight-date-hierarchy/pull/1?src=pr&el=tree#diff-ZGphbmdvX2FkbWluX2xpZ2h0d2VpZ2h0X2RhdGVfaGllcmFyY2h5L3RlbXBsYXRldGFncy9hZG1pbl9saXN0LnB5) | `85.48% <84.61%> (-1.31%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/hakib/django-admin-lightweight-date-hierarchy/pull/1?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/hakib/django-admin-lightweight-date-hierarchy/pull/1?src=pr&el=footer). Last update [2f214e4...df0b5b1](https://codecov.io/gh/hakib/django-admin-lightweight-date-hierarchy/pull/1?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Pushed some CR fixes. Just let me know what you think about this assert.

Fix patch:
diff --git a/django_admin_lightweight_date_hierarchy/templatetags/admin_list.py b/django_admin_lightweight_date_hierarchy/templatetags/ldh_admin_list.py
similarity index 100%
rename from django_admin_lightweight_date_hierarchy/templatetags/admin_list.py
rename to django_admin_lightweight_date_hierarchy/templatetags/ldh_admin_list.py


Test patch:
diff --git a/tests/tests/test_date_heirarchy_drill_down.py b/tests/tests/test_date_heirarchy_drill_down.py
index 77b53a2..b846e7f 100644
--- a/tests/tests/test_date_heirarchy_drill_down.py
+++ b/tests/tests/test_date_heirarchy_drill_down.py
@@ -66,7 +66,7 @@ def test_should_preserve_default_behaviour(self):
             # Current selection
             self.assertContains(response, 'January 15')
 
-    @mock.patch('django_admin_lightweight_date_hierarchy.templatetags.admin_list.get_today')
+    @mock.patch('django_admin_lightweight_date_hierarchy.templatetags.ldh_admin_list.get_today')
     def test_should_show_years_selection_if_hierarchy_level_not_selected(self, mock_today):
         mock_today.return_value = datetime.date(2017, 1, 1)