Skip to content

Commit

Permalink
bootstrap added
Browse files Browse the repository at this point in the history
  • Loading branch information
RamkumarMrj committed Apr 20, 2021
1 parent c49a6d2 commit ed328d0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 94 deletions.
51 changes: 30 additions & 21 deletions core/templates/core/home.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<title>IPC Search Engine</title>
<style>
* {
Expand All @@ -23,44 +25,51 @@
}

input[type='text'] {
width: 30%;
width: 50%;
margin-bottom: 10px;
padding: 10px;
border: 2px solid black;
border: 2px solid rgb(53, 40, 24);
}

input[type='submit'] {
width: 30%;
padding: 5px;
width: 23%;
padding: 10px;
background: black;
color: white;
text-transform: uppercase;
}

form {
margin-bottom: 20px;
}
</style>
</head>

<body>
<div id="main">
<h1>Find the IPC Section Details</h1>
<form method="GET">
<div>
<label for="ipc"></label>
<input type="text" id="ipc" value="{{ request.GET.ipc }}" placeholder="IPC..." name="ipc"/>
<div class="container" id="main">
<h3>Find the IPC Section Details</h3>
<form method="GET">
<div>
<label for="ipc"></label>
<input type="text" id="ipc" value="{{ request.GET.ipc }}" placeholder="Enter IPC" name="ipc" />
<input type="submit" value="Search" />
</div>
</form>
{% if result %}
<div class="container">
<!-- <h2>{{ result.name_head }}</h2> -->
<h3>{{ result.temp_now }}</h3>
</div>
<input type="submit" value="Submit"/>
</form>
{% if result %}
<div class="container">
<!-- <h2>{{ result.name_head }}</h2> -->
<h3>{{ result.temp_now }}</h3>
{% endif %}
</div>
{% endif %}
</div>

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns"
crossorigin="anonymous"></script>

</body>

</html>
2 changes: 1 addition & 1 deletion core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def home(request):
html_content = get_html_content(request)
from bs4 import BeautifulSoup
soup = BeautifulSoup(html_content, 'html.parser')
print(soup)
# print(soup)
result = dict()
# result['name_head'] = soup.find("div", attrs={"class": "qrShPb kno-ecr-pt PZPZlf mfMhoc hNKfZe"}).text
result['temp_now'] = soup.find("div", attrs={"class": "BNeawe s3v9rd AP7Wnd"}).text
Expand Down
72 changes: 0 additions & 72 deletions requiremets.txt

This file was deleted.

Binary file added requirments.txt
Binary file not shown.

0 comments on commit ed328d0

Please sign in to comment.