-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a820504
commit 11fa44c
Showing
11 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .feedback_form import RegisterFeedback |
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from django import forms | ||
from django.contrib.auth.models import User | ||
|
||
|
||
class RegisterFeedback(forms.ModelForm): | ||
|
||
author = forms.CharField( | ||
required=True, | ||
widget=forms.TextInput(attrs={ | ||
'placeholder': 'Nome completo' | ||
}), | ||
label='', | ||
) | ||
|
||
email = forms.CharField( | ||
required=True, | ||
widget=forms.TextInput(attrs={ | ||
'placeholder': 'E-mail válido' | ||
}), | ||
label='', | ||
) | ||
|
||
message = forms.CharField() | ||
|
||
class Meta: | ||
model = User | ||
fields = [ | ||
'author', | ||
'email', | ||
'message', | ||
|
||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
from django.contrib import messages | ||
from django.http import Http404 | ||
from django.shortcuts import render | ||
|
||
from .models import Feedbacks | ||
from .forms import RegisterFeedback | ||
|
||
|
||
def feedback(request): | ||
return render(request, 'pages/home.html') | ||
form = RegisterFeedback() | ||
return render(request, 'pages/home.html', { | ||
'form': 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