Changes between Initial Version and Version 1 of Ticket #35735


Ignore:
Timestamp:
Sep 5, 2024, 10:35:25 AM (3 months ago)
Author:
Fabian Braun
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35735

    • Property Owner set to Fabian Braun
    • Property Status newassigned
  • Ticket #35735 – Description

    initial v1  
    1212Here's a test (that might go into tests/template_tests/syntax_tests/tests_basic.py) which passes on Python 3.9 and fails on Python 3.10+:
    1313{{{
    14     @setup({"basic-syntax19b": "{{ dict.klass.in_template }}"})
     14    @setup({"basic-syntax19b": "{{ klass.in_template }}"})
    1515    def test_access_class_property(self):
    1616        class MyClass(list):
     
    2121                return super().__init__()
    2222
    23         output = self.engine.render_to_string("basic-syntax19b", {"dict": dict(klass=MyClass)})
     23        output = self.engine.render_to_string("basic-syntax19b", {"klass": MyClass})
    2424        self.assertEqual(output, "True")
    2525
     
    2727
    2828I'd be happy to propose a fix.
     29
     30Thanks to [https://github.com/benzkji Ben Stähli] and [https://github.com/last-partizan Serhii Tereshchenko] for figuring out this issue.
     31
     32References:
     33
     34* https://github.com/django-cms/django-cms/issues/7948
Back to Top