Merge branch 'master' into new-signup-questions

new-signup-questions
vilmibm 2019-04-16 00:59:15 +00:00
commit d316fef6b6
2 changed files with 9 additions and 8 deletions

View File

@ -4,15 +4,15 @@ from random import shuffle
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.forms import ChoiceField from django.forms import ChoiceField
CAPTCHA_CHOICES = [('two', 'zorp borp'), CAPTCHA_CHOICES = [('number', 'zorp borp'),
('three', 'quop bop'), ('hey', 'quop bop'),
('four', 'NO, I AM NOT A ROBOT'), ('never', 'NO, I AM NOT A ROBOT'),
('five', 'crackle zop'), ('eleven', 'crackle zop'),
('six', '*rusty screech*'), ('twelve', '*rusty screech*'),
('seven', 'mother, give me legs')] ('eighty', 'mother, give me legs')]
shuffle(CAPTCHA_CHOICES) shuffle(CAPTCHA_CHOICES)
CAPTCHA_CHOICES.insert(0, ('one', 'beep boop'),) CAPTCHA_CHOICES.insert(0, ('one', 'beep boop'),)
NOT_A_ROBOT = 'four' NOT_A_ROBOT = 'never'
def validate_captcha(captcha): def validate_captcha(captcha):
if captcha != NOT_A_ROBOT: if captcha != NOT_A_ROBOT:

View File

@ -21,13 +21,14 @@
<body> <body>
<h1>tilde.town guestbook</h1> <h1>tilde.town guestbook</h1>
<marquee>~*~*~*~*say hello*~*~*~*~</marquee> <marquee>~*~*~*~*say hello*~*~*~*~</marquee>
<form class="tilde" action="{% url 'guestbook:guestbook' %}" method="post"> <!-- <form class="tilde" action="{% url 'guestbook:guestbook' %}" method="post">
{% csrf_token %} {% csrf_token %}
<table> <table>
{{form.as_table}} {{form.as_table}}
</table> </table>
<input type="submit" value="sign" > <input type="submit" value="sign" >
</form> </form>
-->
{% for m in messages %} {% for m in messages %}
<p> <p>