Spaces:
Runtime error
Runtime error
Download src/social/forms.py from pgsoft/django-pgsns: direct link, hf CLI and curl.
- Browser
- Download file 616 Bytes
-
https://huggingface.co/spaces/pgsoft/django-pgsns/resolve/main/src/social/forms.py
- Command line
-
hf download hf://spaces/pgsoft/django-pgsns/src/social/forms.py
-
curl -L -o forms.py https://huggingface.co/spaces/pgsoft/django-pgsns/resolve/main/src/social/forms.py
616 Bytes
| from django import forms | |
| from .models import Post, Comment | |
| class PostForm(forms.ModelForm): | |
| body = forms.CharField( | |
| label='', | |
| widget=forms.Textarea( | |
| attrs={'rows': '3', | |
| 'placeholder': 'Say Something...'} | |
| )) | |
| class Meta: | |
| model = Post | |
| fields = ['body'] | |
| class CommentForm(forms.ModelForm): | |
| comment = forms.CharField( | |
| label='', | |
| widget=forms.Textarea( | |
| attrs={'rows': '3', | |
| 'placeholder': 'Say Something...'} | |
| )) | |
| class Meta: | |
| model = Comment | |
| fields = ['comment'] | |