thx, za porady ale może Pan jeszcze spojrzeć na kod, bo chyba coś pomyliłem niby wszystko działa ale nie mam dalej danych w panelu admina :/
class NoteView(View):
def get(self, request):
if request.method == 'POST':
textN = Note.objects.all().order_by('notes')
form = NoteAddForm(request.POST)
if form.is_valid():
form.save()
return redirect('Files/menu')
else:
textN = NoteAddForm()
return render(request, 'Files/note.html', {'textN': textN})
class NoteAddForm(forms.ModelForm):
"""New note add form"""
class Meta:
model = Note
fields = '__all__'
<form action="/send/" method="post">
{% csrf_token %}
{{ textN }}
<label>
<input type="text" class="btn btn-second btn-lg">
<button><a href="{% url 'send' %}">Wyślij formularz</a></button>
</label>
</form>