Created
January 4, 2015 02:16
-
-
Save liondancer/7f24db933eeb49e29e9e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class TestForm(forms.Form): | |
one = forms.ChoiceField(choices=('HDFS', 'HDFS'), widget=forms.RadioSelect()) | |
two = forms.ChoiceField(choices=('HIVE', 'HIVE'), widget=forms.RadioSelect()) | |
three = forms.ChoiceField(choices=('BOTH', 'Both of HDFS and HIVE'), widget=forms.RadioSelect()) | |
beatle = [one, two, three] | |
event_textarea = forms.Textarea(attrs={'rows': '8', 'class': 'form-control', 'placeholder': 'Events...', 'id': 'event_textarea'}) |
This file contains hidden or 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
{% extends 'index/index.html' %} | |
{% load staticfiles %} | |
{% block head %} | |
<script type="text/javascript" src="{{ STATIC_URL }}home/js/home.js" async></script> | |
<link href="{{ STATIC_URL }}home/css/home.css" rel="stylesheet"> | |
{% endblock head %} | |
{% block content %} | |
<div>Welcome to Trinity E2E testing</div> | |
<form id="test-form" action="/test/" method="post"> {# pass data to /test/ URL #} | |
{% csrf_token %} | |
{% for radio in form.beatle %} | |
<div class="btn btn-default btn-lg"> | |
{{ radio }} | |
</div> | |
{% endfor %} | |
{{ form.event_textarea }} | |
<input id="submit-test" type="submit" class="btn btn-default btn-lg" value="Submit"> | |
</form> | |
{% endblock content %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment