Ok, I solved the problem. First I have put form.media where it should be, in the header. But that did not change the behavior I described in the previous post. Then I have replaced form.as_p with fields_for form, removing csrf_token because fields_for creates the token automatically. So, in this way, it has worked:
{% extends "base.html" %}
{% load mezzanine_tags i18n %}
{% block extra_head %}
{{ block.super }}
{{ form.media }}
{% endblock %}
{% block main %}
{% block my_form %}
<form method="post">
{% fields_for form %}
<button type="submit" class="btn btn-primary">{% trans "Submit" %}</button>
</form>
{% endblock %}
{% endblock %}