-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
131 lines (131 loc) · 5.08 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
crossorigin="anonymous"
/>
{% load static %}
<link rel="stylesheet" href="{% static 'style.css' %}" type="text/css" />
<title>National Stock Exchange of India Limited</title>
</head>
<body>
<form action="{% url 'show_result' %}" method="POST">
{% csrf_token %}
<div class="container">
<div class="box">
<select
class="form-select form-select-sm"
aria-label=".form-select-sm example"
name="symbol"
>
<option selected>View Options Contracts for</option>
<option value="NIFTY">NIFTY</option>
<option value="FINNIFTY">FINNIFTY</option>
<option value="BANKNIFTY">BANKNIFTY</option>
</select>
</div>
<div class="box">
<select
class="form-select form-select-sm"
aria-label=".form-select-sm example"
name="expiry_date"
>
<option selected>Expiry Date</option>
{% for date in expiry_dates %}
<option value="{{ date }}">
{{ date }}
</option>
{% endfor %}
</select>
</div>
<div class="box">
<button class="btn btn-outline-primary">Show Result</button>
</div>
</div>
</form>
<table class="table table-hover">
{% if has_data %}
<tr>
<th class="table-secondary" style="text-align:center" colspan="12">
CALLS
</th>
</tr>
{% endif %}
<tr>
{% for key in ce_data.keys %}
{% if forloop.counter == 2 or forloop.counter == 3 or forloop.counter == 4 or forloop.counter == 7 or forloop.counter == 13 or forloop.counter == 14 or forloop.counter == 19 %}
<!-- do nothing -->
{% else %}
<th>{{ key }}</th>
{% endif %}
{% endfor %}
</tr>
{% for data in ce_data.values %}
<tr>
{% for value in data %}
{% if forloop.counter == 2 or forloop.counter == 3 or forloop.counter == 4 or forloop.counter == 7 or forloop.counter == 13 or forloop.counter == 14 or forloop.counter == 19 %}
<!-- do nothing -->
{% elif forloop.counter == 1 %}
<td class="table-primary">{{ value }}</td>
{% elif forloop.counter == 11 or forloop.counter == 12 and value > 0 %}
<td class="table-success">{{ value }}</td>
{% elif forloop.counter == 11 or forloop.counter == 12 and value < 0 %}
<td class="table-danger">{{ value }}</td>
{% elif forloop.counter == 11 or forloop.counter == 12 and value == 0 %}
<td class="table-warning">{{ value }}</td>
{% else %}
<td>{{ value }}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</table>
<table class="table table-hover">
{% if has_data %}
<tr>
<th class="table-secondary" style="text-align:center" colspan="12">
PUTS
</th>
</tr>
{% endif %}
<tr>
{% for key in pe_data.keys %}
{% if forloop.counter == 2 or forloop.counter == 3 or forloop.counter == 4 or forloop.counter == 7 or forloop.counter == 13 or forloop.counter == 14 or forloop.counter == 19 %}
<!-- do nothing -->
{% else %}
<th>{{ key }}</th>
{% endif %}
{% endfor %}
</tr>
{% for data in pe_data.values %}
<tr>
{% for value in data %}
{% if forloop.counter == 2 or forloop.counter == 3 or forloop.counter == 4 or forloop.counter == 7 or forloop.counter == 13 or forloop.counter == 14 or forloop.counter == 19 %}
<!-- do nothing -->
{% elif forloop.counter == 1 %}
<td class="table-primary">{{ value }}</td>
{% elif forloop.counter == 11 or forloop.counter == 12 and value > 0 %}
<td class="table-success">{{ value }}</td>
{% elif forloop.counter == 11 or forloop.counter == 12 and value < 0 %}
<td class="table-danger">{{ value }}</td>
{% elif forloop.counter == 11 or forloop.counter == 12 and value == 0 %}
<td class="table-warning">{{ value }}</td>
{% else %}
<td>{{ value }}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</table>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
crossorigin="anonymous"
></script>
</body>
</html>