Download apps/documents/admin/evidence/forms.py from jun2024/fc: direct link, hf CLI and curl.
- Browser
- Download file 531 Bytes
-
https://huggingface.co/spaces/jun2024/fc/resolve/main/apps/documents/admin/evidence/forms.py
- Command line
-
hf download hf://spaces/jun2024/fc/apps/documents/admin/evidence/forms.py
-
curl -L -o forms.py https://huggingface.co/spaces/jun2024/fc/resolve/main/apps/documents/admin/evidence/forms.py
531 Bytes
| """Module for forms.""" | |
| from __future__ import annotations | |
| from typing import Any | |
| from django import forms | |
| from apps.documents.models import EvidenceList | |
| class EvidenceListForm(forms.ModelForm[EvidenceList]): | |
| class Meta: | |
| model = EvidenceList | |
| fields: str = "__all__" | |
| def __init__(self, *args: Any, **kwargs: Any) -> None: | |
| super().__init__(*args, **kwargs) | |
| if "list_type" in self.fields: | |
| self.fields["list_type"].disabled = True | |
| __all__: list[str] = ["EvidenceListForm"] | |