#35233: Push templates checks down to backend engine classes
     Reporter:  Adam Johnson         |                    Owner:  Giannis
         Type:                       |  Terzopoulos
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (System         |                  Version:  dev
  checks)                            |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
Comment (by Giannis Terzopoulos):

 Thank you for the pointers Adam! I finally found the time to look into
 this and I have some questions.
 > 2. `check_for_template_tags_with_the_same_name` is inaccurate because it
 combines `libraries` from all template backends, so might report an issue
 when none exists.
 Regarding this, am I right in assuming that we want to allow same names
 for tags across different engines; Should this test pass?

 def test_different_backends_may_have_same_tags(self):
     with self.settings(
             {"BACKEND": "django.template.backends.django.DjangoTemplates",
              "OPTIONS": {"libraries": {
             {"BACKEND": "django.template.backends.OtherBackend",
              "OPTIONS": {"libraries": {
 self.assertListEqual(check_for_template_tags_with_the_same_name(None), [])

 And one more thing, I am noticing that the `E001` logic is duplicated:
 - in `Engine.__init__` - raises `ImproperlyConfigured`
 - and in `check_setting_app_dirs_loaders` (tests under
 and I am wondering if it's enough to keep one of the two, perhaps the
 check? 🤔
Ticket URL: <https://code.djangoproject.com/ticket/35233#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to