-
-
Save aliceridgway/24821183a49046de3f38a0633d488294 to your computer and use it in GitHub Desktop.
Basic Django form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
from . import models | |
class PostForm(forms.ModelForm): | |
class Meta: | |
model = models.Post | |
fields = ["title", "body"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment