Skip to content

Commit

Permalink
feat(#1): add templates for test
Browse files Browse the repository at this point in the history
  • Loading branch information
wdresende committed May 21, 2019
1 parent b5e96dc commit 344d48d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
17 changes: 17 additions & 0 deletions students/templates/student-form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>New Student</h1>
<form method="POST">
{% csrf_token %}
{{ form }}
<button type="submit">Save</button>
</form>
</body>
</html>
12 changes: 12 additions & 0 deletions students/templates/students.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=h1, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>Teste</h1>
</body>
</html>
4 changes: 3 additions & 1 deletion students/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ def create_student(resquest):
form = StudentForm(resquest.POST or None)

if form.is_valid():
form.save()
form.save()

return render(resquest, 'student-form.html', {'form': form})

0 comments on commit 344d48d

Please sign in to comment.