A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/torchbox/django-pattern-library/issues/10 below:

No way to specify objects that have attributes and support iteration · Issue #10 · torchbox/django-pattern-library · GitHub

In GitLab by @bcdickinson on Dec 19, 2017, 22:15

Motivating example from: search results. search_results value is both iterated and accessed with dot notation:

{% for result in search_results %}
{% if search_results.paginator.count %}

The YAML format doesn't support specifying values that behave this way. A possible suggestion would be to allow numeric keys in the YAML e.g.

search_results:
  paginator:
    count: 42
  0: ... # result 1
  1: ... # result 2
  ...

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4