viewflow / django-material

Material Design for Django
http://viewflow.io/
BSD 3-Clause "New" or "Revised" License
2.48k stars 424 forks source link

Label and validation for foreing key #493

Closed salvacnj closed 3 years ago

salvacnj commented 3 years ago

Hello,

There is an error with foreing key selector labels, they doesn't appear.

imagen

I've found a temporary aesthetic solution, place then with the Fieldset, but it would be nice to solve it.

imagen

Validation for empty field are neither appearing for empty foreing key, and it confuse user when form submition. I attach and example of normal field and a foreing key (wich should have validation).

imagen

Thank you and regards, Salva.

kmmbvnr commented 3 years ago

Can you reproduces it with the demo?

Here is the Country that has the Fk to Continent, and there it seems everything fine with the label - http://demo.viewflow.io/integration/country/121/change/

CRUD-sample-Viewflow-Demo

salvacnj commented 3 years ago

The problems could came from the add/edit small button wich are on the input.

I'm using a third app django-material-admin for admin panel customization. I override _admin/changeform.html template to combine django-material forms with django-material-admin forms (wich display correctly the forms as Is showed in the attached imagen).

{% block field_sets %}
    {% if adminform.form.layout %}
        {% form form=adminform.form %}{% endform %}
    {% else %}
        {% for fieldset in adminform %}
            {% include "admin/includes/fieldset.html" %}
        {% endfor %}
    {% endif %}
{% endblock %} 

django-material-admin fk

Is there anyway to directly customize django admin with your app (django-material)?

Thank you and regards, Salva.

kmmbvnr commented 3 years ago

django-material has no support for the django admin. There is no plan to add it, since it opens a way to huge amount of possible issues.

i'm closing this, since it looks that the issue related to the django-material-admin itself.