> For the complete documentation index, see [llms.txt](https://olee-tech.gitbook.io/django/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://olee-tech.gitbook.io/django/mongodb/formset-crud/forms.py.md).

# forms.py

```python
from django_mongoengine import Document
from django_mongoengine.forms import DocumentForm
from .models import Author, Book

class AuthorForm(DocumentForm):
    class Meta:
        model = Author
        fields = '__all__'

class BookForm(DocumentForm):
    class Meta:
        model = Book
        fields = '__all__'
```
