Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions photoapp/migrations/0017_auto_20210130_1810.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 2.0.2 on 2021-01-30 12:40

import datetime
from django.db import migrations, models
from django.utils.timezone import utc


class Migration(migrations.Migration):

dependencies = [
('photoapp', '0016_auto_20210125_1053'),
]

operations = [
migrations.AlterField(
model_name='comment',
name='date',
field=models.DateTimeField(default=datetime.datetime(2021, 1, 30, 12, 40, 28, 822719, tzinfo=utc)),
),
]
20 changes: 20 additions & 0 deletions photoapp/migrations/0018_auto_20210130_1821.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 2.0.2 on 2021-01-30 12:51

import datetime
from django.db import migrations, models
from django.utils.timezone import utc


class Migration(migrations.Migration):

dependencies = [
('photoapp', '0017_auto_20210130_1810'),
]

operations = [
migrations.AlterField(
model_name='comment',
name='date',
field=models.DateTimeField(default=datetime.datetime(2021, 1, 30, 12, 51, 35, 57111, tzinfo=utc)),
),
]
69 changes: 56 additions & 13 deletions photoapp/templates/photoapp/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>

html{
font-size: 10px;
box-sizing: border-box;
Expand Down Expand Up @@ -73,16 +74,49 @@
border-radius: 0.5rem;
}
.form-btn{
margin: 1rem 0 1.5rem;
height: 3rem;
background-color: burlywood;
font-size: 1.5rem;
color: darkslategray;
font-weight: bold;
border: none;
border-radius: 0.5rem;
cursor: pointer;
background-color: #4CAF50; /* Green */
border: none;
color: black;
transition-duration: 0.4s;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
width: 150px;
border-radius: 10px;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}

.form-btn:hover {
background-color: black;
color: white;
}

.button {
display: inline-block;
padding: 10px 18px;
font-size: 16px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: #4CAF50;
border: none;
border-radius: 9px;
box-shadow: 0 5px #999;
}

.button:hover {background-color: #3e8e41}

.button:active {
background-color: #3e8e41;
box-shadow: 0 4px #666;
transform: translateY(4px);
}

.has-separator{
font-size: 1.5rem;
color: black;
Expand Down Expand Up @@ -113,7 +147,7 @@
font-weight: bold;
}

</style>
</style>
<title>Insta</title>

</head>
Expand All @@ -126,15 +160,24 @@
<div class="logo">
<img src="media/images/logo.png" alt="">
</div>

<div class ="sign-up-1">
<button class="form-btn">
<a href={% url 'login' %}>Login</a>
</button>
</div>

<div class ="sign-up-3">
<a href={% provider_login_url 'google' %}>Sign In with Google</a>
<button class="form-btn">
<a href={% provider_login_url 'google' %} align="inline" >Google SignIn</a>
<button>
</div>

<div class ="sign-up-2">
Don't have an account?<a href={% url 'signup' %}>Sign Up</a>
<b> Don't have an account? </b>
<button class="form-btn">
<a href={% url 'signup' %}> Sign Up </a>
</button>
</div>

</div>
Expand Down
30 changes: 28 additions & 2 deletions photoapp/templates/photoapp/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,28 @@
color: blue;
font-weight: bold;
}
.button {
display: inline-block;
padding: 10px 18px;
font-size: 16px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: #4CAF50;
border: none;
border-radius: 9px;
box-shadow: 0 5px #999;
}

.button:hover {background-color: #3e8e41}

.button:active {
background-color: #3e8e41;
box-shadow: 0 4px #666;
transform: translateY(4px);
}

</style>

Expand All @@ -131,12 +153,16 @@ <h3>LOGIN</h3>

<input type="text" name="username" placeholder="username">
<input type="password" name="password" placeholder="password">
<button class ="form-btn" type="submit">Log In</button>
<button class ="button" type="submit">Log In</button>
<br>
<span class="has-separator">Or</span>

</form>
<div class ="sign-up">
Don't have an account?<a href={% url 'signup' %}>Sign Up</a>
Don't have an account?
<button class = "button">
<a href={% url 'signup' %}> Sign Up</a>
<button>
</div>
</div>
</div>
Expand Down
13 changes: 9 additions & 4 deletions photoapp/templates/photoapp/postlist.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@
<div class="row">
<div class="col"></div>
<div class="col">
<h1>THE
LIST OF POSTS</h1>
<h1 class="jumbotron">THE LIST OF POSTS</h1>
<button class="button">
<a href={%url 'logout'%}>signout</a>
</button>

<a href="{% url 'update_profile' %}"><h3>UpdateProfile</h3></a><br>
<button class="button">
<a href="{% url 'update_profile' %}"><b>UpdateProfile</b></a>
</button>
<br>
lists

<button class="button">
<a href="{% url 'create_post' %}"><h3>Create post</h3></a><br>

</button>

{% for i in posts %}
<br>
Expand Down
39 changes: 35 additions & 4 deletions photoapp/templates/photoapp/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,49 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>SIGNUP</title>
</head>
<style>
.button {
display: inline-block;
padding: 5px 10px;
font-size: 20px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: #fff;
background-color: #4CAF50;
border: none;
border-radius: 12px;
box-shadow: 0 7px #999;
}

.button:hover {background-color: #3e8e41}

.button:active {
background-color: #3e8e41;
box-shadow: 0 5px #666;
transform: translateY(4px);
}
</style>
<body>
<div class='container'>
<div class="jumbotron">
<h1>Signup!!</h1>
<div class = "jumbotron">
<h1 align= "center" >Signup!!!</h1>
</div>
<form method="POST" action="">
{% csrf_token %}
{{ form|crispy }}
<input class="btn btn-success" type="submit" value="signup">
<button class="button">
<input class="btn btn-success" type="submit" value="signup">
</button>
<div>
{% if request.path == "/signup/" %}
Have an Account <a href="{% url 'login'%}">Login Here</a>
<b>Have an Account </b>
<button class="button">
<a href="{% url 'login'%}"> Login Here </a>
</button>
{% endif %}
</div>
</form>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Django==2.0.2
django-crispy-forms==1.8.1
djangorestframework==3.11.0
Pillow==7.0.0
Pillow==8.0.0
pytz==2019.3


Expand Down