Skip to content

Commit

Permalink
commitrf
Browse files Browse the repository at this point in the history
  • Loading branch information
yashyp12 committed Feb 1, 2024
1 parent 970e705 commit e4c5826
Show file tree
Hide file tree
Showing 33 changed files with 64 additions and 52 deletions.
10 changes: 10 additions & 0 deletions .idea/dataSources.local.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Python_YP/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added Python_YP/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file modified Python_YP/__pycache__/settings.cpython-311.pyc
Binary file not shown.
Binary file added Python_YP/__pycache__/settings.cpython-312.pyc
Binary file not shown.
Binary file modified Python_YP/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file added Python_YP/__pycache__/urls.cpython-312.pyc
Binary file not shown.
Binary file added Python_YP/__pycache__/wsgi.cpython-312.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions Python_YP/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# Application definition

INSTALLED_APPS = [
INSTALLED_APPS = (
'myapp.apps.MyappConfig',
'django.contrib.admin',
'django.contrib.auth',
Expand All @@ -40,7 +40,7 @@
'django.contrib.staticfiles',
'crispy_forms',

]
)

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
Expand Down
5 changes: 2 additions & 3 deletions Python_YP/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,include
from myapp import views
from django.urls import path
from myapp.views import aboutus

from myapp import views
from myapp.views import aboutus

admin.site.site_header = "Techie Yp Admin "
admin.site.site_title = "Techie Yp admin "
Expand Down
Binary file modified db.sqlite3
Binary file not shown.
Binary file modified myapp/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added myapp/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file added myapp/__pycache__/admin.cpython-312.pyc
Binary file not shown.
Binary file modified myapp/__pycache__/apps.cpython-311.pyc
Binary file not shown.
Binary file added myapp/__pycache__/apps.cpython-312.pyc
Binary file not shown.
Binary file added myapp/__pycache__/forms.cpython-312.pyc
Binary file not shown.
Binary file added myapp/__pycache__/models.cpython-312.pyc
Binary file not shown.
Binary file modified myapp/__pycache__/views.cpython-311.pyc
Binary file not shown.
Binary file added myapp/__pycache__/views.cpython-312.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions myapp/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django import forms
from .models import Contact


class ContactForm(forms.ModelForm):
class Meta:
model = Contact
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions myapp/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# models.py
from django.db import models


class Contact(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField()
Expand Down
45 changes: 22 additions & 23 deletions myapp/views.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,46 @@
from django.shortcuts import render,redirect
from django.http import HttpResponse
from django.contrib.auth import authenticate,login
import requests
from django.contrib import messages
from django.contrib.auth import authenticate, login
from django.contrib.auth import logout
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import login as auth_login
from django.contrib.auth.models import User
from django.shortcuts import redirect
from django.shortcuts import render

from .forms import ContactForm
from django.http import JsonResponse


import requests
from django.shortcuts import render

# Create your views here.
def index(request):
return render(request,'index.html')
return render(request, 'index.html')


def AboutUs(request):
return render(request,'about-us.html')
return render(request, 'about-us.html')


def TopCoins(request):
return render(request,'Top-coins.html')
return render(request, 'Top-coins.html')



def LoginUser(request):
if request.method == "POST" :
if request.method == "POST":
username = request.POST.get('username')
password = request.POST.get('password')
user = authenticate(username=username, password=password)
if user is not None:
login(request,user)
login(request, user)
messages.success(request, "Logged Successfully!")
return redirect("/")

else:
messages.success(request, "Please Enter Valid Password And Unsername!")
return render(request,'login-page.html')
return render(request,'login-page.html')
return render(request, 'login-page.html')
return render(request, 'login-page.html')

def LogOut(request):
logout(request)
return render(request,'login-page.html')

def LogOut(request):
logout(request)
return render(request, 'login-page.html')


def btc_price(request):
Expand All @@ -51,7 +49,7 @@ def btc_price(request):
data = response.json()
btc_price = data['bitcoin']['usd']

return render(request, 'Top-coins.html', {'btc_price':btc_price})
return render(request, 'Top-coins.html', {'btc_price': btc_price})


def signupuser(request):
Expand All @@ -78,6 +76,7 @@ def signupuser(request):

return render(request, 'signupuser.html')


def aboutus(request):
if request.method == 'POST':
form = ContactForm(request.POST)
Expand All @@ -90,4 +89,4 @@ def aboutus(request):
else:
form = ContactForm()

return render(request, 'about-us.html', {'form': form})
return render(request, 'about-us.html', {'form': form})
6 changes: 3 additions & 3 deletions templates/Top-coins.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
name="viewport"
content="width=device-width, initial-scale=1.0, shrink-to-fit=no"
/>
<title>techie-yp</title>
<title>Crypto X</title>
<meta name="" content="" />
<link
<link
rel="icon"
type="image/png"
sizes="27x16"
Expand Down Expand Up @@ -251,7 +251,7 @@ <h1></h1>
style="height: 73px; font-family: Abel, sans-serif"
>
<div class="container">
<a class="navbar-brand" href="index.html" target="_top"
<a class="navbar-brand" href="#" target="_top"
><strong>Techie Yp</strong></a
><button
data-bs-toggle="collapse"
Expand Down
5 changes: 2 additions & 3 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ <h2>Top 5 Crypto Airdrop🪂</h2>
margin: 430px;
padding: 17px;
border-style: initial;
border-color: var(--bs-red);
">
border-color: var(--bs-red);">
<!-- <strong><span style="color: rgb(7, 7, 7)">Crypto for Everyone&nbsp;</span> </strong> -->
</h3>
</div>
Expand Down Expand Up @@ -313,7 +312,7 @@ <h4>About the company</h4>
</div>
</footer>
<div class="container">
<ul class="list-inline" style="height: -16px">
<ul class="list-inline" style="height: 16px">
<li class="list-inline-item"><a href="#">Privacy</a></li>
<li class="list-inline-item"><a href="#">Terms</a></li>
<li class="list-inline-item"><a href="#">FAQ</a></li>
Expand Down
14 changes: 7 additions & 7 deletions templates/login-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>techie-yp</title>
<title>Crypto X</title>
<meta name="" content="">
<link rel="icon" type="image/png" sizes="27x16" href="/static/assets/img/favv.png">
<link rel="icon" type="image/png" sizes="645x387" href="/static/assets/img/logo-removebg-preview.png">
Expand All @@ -19,22 +19,22 @@
</head>

<body style="background: url(&quot;/static/assets/img/pexels-cottonbro-studio-8721339.jpg&quot;) center / cover no-repeat;height: 712px;">
<form action="/LoginUser" method="post" data-aos="zoom-in" id="form" style="font-family: Allerta, sans-serif;width: 332px;padding: 0px;background: rgba(0,0,0,0.12);height: 322px;margin: 0px;--bs-body-font-size: 17rem;border-radius: -23px;border-width: 32px;border-style: initial;">
<form action="/LoginUser" method="post" data-aos="zoom-in" id="form" style="font-family: Allerta, sans-serif;width: 332px;padding: 0px;background: rgba(0,0,0,0.12);height: 322px;margin: 0px;--bs-body-font-size: 17rem;border-radius: 23px;border-width: 32px;border-style: initial;">
{% csrf_token %}
<h1 id="head" style="color: rgb(193,166,83);background: rgba(0,0,0,0.12);border-color: var(--bs-pink);"><strong><span style="color: rgb(209, 209, 198);">Login&nbsp;&nbsp;</span></strong></h1>
<div></div>
<div class="form-group mb-3"><input class="form-control" type="email" id="formum" style="background: rgba(0,0,0,0.12);" placeholder="Email" name="username" value=" " autofocus="" inputmode="email"></div>
<div class="form-group mb-3"><input class="form-control" type="password" id="formum2" placeholder="Password" autofocus="" required="" minlength="6" maxlength=" " name="password"></div>
<button class="btn btn-secondary btn-sm text-nowrap fs-6 fw-bolder text-center link-danger" id="butonas" style="width: 45%;height: 16%;margin: 39px;margin-bottom: 10px;background: rgba(0,0,0,0.12);padding: 10px 12px;text-align: center;transform: perspective(480px) translate(29px);" type="submit">Login</button><a id="linkas" style="font-size:12px;margin:auto;margin-left:0;margin-right:0;margin-bottom:0;margin-top:0;padding-left:0;padding-right:0;color:rgb(177,151,70);" href="#">Forgot Password ?</a>
<button class="btn btn-secondary btn-sm text-nowrap fs-6 fw-bolder text-center link-danger" id="butonas" style="width: 45%;height: 16%;margin: 39px;margin-bottom: 10px;background: rgba(0,0,0,0.12);padding: 10px 12px;text-align: center;transform: perspective(480px) translate(29px);" type="submit">Login</button><a id="linkas" style="font-size:12px;margin:auto;margin-left:0;margin-right:0;margin-bottom:0;margin-top:0;padding-left:0;padding-right:0;color:rgb(177,151,70);" href="">Signup here</a>
</form>

<nav class="navbar navbar-light navbar-expand-lg fixed-top" id="mainNav" style="height: 73px;font-family: Abel, sans-serif;">
<div class="container"><a class="navbar-brand" href="#page-top"><strong>Techie Yp</strong></a><button data-bs-toggle="collapse" data-bs-target="#navbarResponsive" class="navbar-toggler float-end" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"><i class="fa fa-bars"></i></button>
<div class="container"><a class="navbar-brand" href="#page-top"><strong>Crypto X</strong></a><button data-bs-toggle="collapse" data-bs-target="#navbarResponsive" class="navbar-toggler float-end" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"><i class="fa fa-bars"></i></button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link active" href="/">HOME</a></li>
<li class="nav-item"><a class="nav-link" href="TopCoins">Top Coins</a></li>
<li class="nav-item"><a class="nav-link" href="AboutUs">ABOUT US</a></li>
<!-- <li class="nav-item"><a class="nav-link active" href="/">HOME</a></li> -->
<!-- <li class="nav-item"><a class="nav-link" href="TopCoins">Top Coins</a></li> -->
<!-- <li class="nav-item"><a class="nav-link" href="AboutUs">ABOUT US</a></li> -->
<li class="nav-item"></li>
<li class="nav-item"></li>
</ul>
Expand Down
19 changes: 9 additions & 10 deletions templates/signupuser.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<title>Signup-Crypto X</title>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
Expand Down Expand Up @@ -36,12 +36,12 @@
<body>

<nav class="navbar navbar-light navbar-expand-lg fixed-top" id="mainNav" style="height: 73px;font-family: Abel, sans-serif;">
<div class="container"><a class="navbar-brand" href="#page-top"><strong>Techie Yp</strong></a><button data-bs-toggle="collapse" data-bs-target="#navbarResponsive" class="navbar-toggler float-end" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"><i class="fa fa-bars"></i></button>
<div class="container"><a class="navbar-brand" href="#page-top"><strong>Crypto X</strong></a><button data-bs-toggle="collapse" data-bs-target="#navbarResponsive" class="navbar-toggler float-end" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"><i class="fa fa-bars"></i></button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link active" href="/">HOME</a></li>
<li class="nav-item"><a class="nav-link" href="TopCoins">Top Coins</a></li>
<li class="nav-item"><a class="nav-link" href="AboutUs">ABOUT US</a></li>
<!-- <li class="nav-item"><a class="nav-link" href="TopCoins">Top Coins</a></li> -->
<!-- <li class="nav-item"><a class="nav-link" href="AboutUs">ABOUT US</a></li> -->
<li class="nav-item"></li>
<li class="nav-item"></li>
</ul>
Expand All @@ -56,18 +56,17 @@
"

>
<div class="mask d-flex align-items-center h-100 gradient-custom-3">
<div class="container h-100">
<div class="mask d-flex align-items-center h-50 gradient-custom-3">
<div class="container h-50">
<div
class="row d-flex justify-content-center align-items-center h-100"
class="row d-flex justify-content-center align-items-center h-50"
>
<div class="col-12 col-md-9 col-lg-7 col-xl-6">
<div class="col-10 col-md-9 col-lg-7 col-xl-6">
<div class="card" style="border-radius: 15px">
<div class="card-body p-5">
<h2 class="text-uppercase text-center mb-5">
Create an account
</h2>
{% load crispy_forms_tags %}

<form action="{% url 'signupuser' %}" method="post" class="bg">
{% csrf_token %}
Expand Down Expand Up @@ -115,7 +114,7 @@ <h2 class="text-uppercase text-center mb-5">
</section>

<footer style="height: 394px; padding-top: 10px; margin-top: 0px; " >
<footer style="height: 247px">
<footer style="height: 150px">
<div class="row">
<div class="col-sm-6 col-md-4 footer-navigation">
<h3>
Expand Down

0 comments on commit e4c5826

Please sign in to comment.