diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/contact/form.html | 17 | ||||
-rw-r--r-- | templates/contact/thanks.html | 14 | ||||
-rw-r--r-- | templates/index.html | 3 |
3 files changed, 34 insertions, 0 deletions
diff --git a/templates/contact/form.html b/templates/contact/form.html new file mode 100644 index 0000000..7ada5e0 --- /dev/null +++ b/templates/contact/form.html | |||
@@ -0,0 +1,17 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta charset="utf-8"> | ||
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
6 | <title>Contact Us</title> | ||
7 | <meta name="viewport" content="width=device-width"> | ||
8 | </head> | ||
9 | <body> | ||
10 | <h1>Contact Us</h1> | ||
11 | <form action="{% url 'contact:thanks' %}" method="post"> | ||
12 | {% csrf_token %} | ||
13 | {{ form.as_p }} | ||
14 | <button type="submit">Contact Us</button> | ||
15 | </form> | ||
16 | </body> | ||
17 | </html> | ||
diff --git a/templates/contact/thanks.html b/templates/contact/thanks.html new file mode 100644 index 0000000..67e8336 --- /dev/null +++ b/templates/contact/thanks.html | |||
@@ -0,0 +1,14 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta charset="utf-8"> | ||
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
6 | <title>Thank You</title> | ||
7 | <meta name="viewport" content="width=device-width"> | ||
8 | </head> | ||
9 | <body> | ||
10 | <h1>Thanks for contacting us</h1> | ||
11 | <p>We have sent the following message to the organizers. Thanks.</p> | ||
12 | <p>{{ form.message.value }}</p> | ||
13 | </body> | ||
14 | </html> | ||
diff --git a/templates/index.html b/templates/index.html index a522fbd..0ea840f 100644 --- a/templates/index.html +++ b/templates/index.html | |||
@@ -8,6 +8,9 @@ | |||
8 | </head> | 8 | </head> |
9 | <body> | 9 | <body> |
10 | <h1>Hello Codemash</h1> | 10 | <h1>Hello Codemash</h1> |
11 | <ul> | ||
12 | <li><a href="{% url 'contact:form' %}">Contact Us</a></li> | ||
13 | </ul> | ||
11 | <p>You've just created your first Django page. Pretty cool, eh?</p> | 14 | <p>You've just created your first Django page. Pretty cool, eh?</p> |
12 | </body> | 15 | </body> |
13 | </html> | 16 | </html> |