Ensure that a Tweet is a DynamicDocument and then loop the Tweet._dynamic_fields
attribute to get the name of any dynamic fields.
Something like:
{% for tweet in tweets %}
<b>Tweets list</b>
<h2><a href="{{ url_for('posts.detail', slug=tweet.slug) }}">{{ tweet.text }}</a></h2>
{% if tweet.post_type == 'Tweet' %}
<b>{{ tweet.text }}</b>
<p>{{ tweet.lang }}</p>
{% for field in tweet._dynamic_fields -%}
<p>{{ tweet[field] }}</p>
{%- endfor %}
{% endif %}
{% endfor %}
Thats untested and I'm not 100% sure on how you dynamically get an attr in jinja2.