-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from bounswe/kaan-image-test
images available for profile and posts
- Loading branch information
Showing
13 changed files
with
118 additions
and
20 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Generated by Django 5.0.4 on 2024-05-11 12:40 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('nba_app', '0003_comment'), | ||
('nba_app', '0003_follow_user_following'), | ||
('nba_app', '0004_alter_post_image'), | ||
] | ||
|
||
operations = [ | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.0.4 on 2024-05-11 14:34 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('nba_app', '0005_merge_20240511_1240'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='comment', | ||
name='image', | ||
field=models.ImageField(blank=True, null=True, upload_to='comment_images/'), | ||
), | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 5.0.4 on 2024-05-11 14:56 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('nba_app', '0006_comment_image'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='comment', | ||
name='image', | ||
), | ||
] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>User Profile</title> | ||
</head> | ||
<body> | ||
<h1>User Profile</h1> | ||
<div> | ||
<h2>{{ username }}</h2> | ||
<p>Email: {{ email }}</p> | ||
<p>Bio: {{ bio }}</p> | ||
{% if profile_picture %} | ||
<img src="{{ profile_picture }}" alt="Profile Picture"> | ||
{% else %} | ||
<p>No profile picture available</p> | ||
{% endif %} | ||
<p>Following: {{ following_count }}</p> | ||
<p>Followers: {{ followers_count }}</p> | ||
</div> | ||
|
||
<h2>Posts</h2> | ||
<ul> | ||
{% for post in posts %} | ||
<li> | ||
<p>{{ post.content }}</p> | ||
<p>Created At: {{ post.created_at }}</p> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
|
||
<!-- Add form for editing profile information --> | ||
<h2>Edit Profile</h2> | ||
<form action="{% url 'profile_view_edit' %}" method="post" enctype="multipart/form-data"> | ||
{% csrf_token %} | ||
<label for="username">Username:</label> | ||
<input type="text" name="username" id="username"><br> | ||
<label for="email">Email:</label> | ||
<input type="email" name="email" id="email"><br> | ||
<label for="profile_picture">Profile Picture:</label> | ||
<input type="file" name="profile_picture" id="profile_picture"><br> | ||
<label for="bio">Bio:</label> | ||
<textarea name="bio" id="bio"></textarea><br> | ||
<label for="password">Password:</label> | ||
<input type="password" name="password" id="password"><br> | ||
<input type="submit" value="Update"> | ||
</form> | ||
</body> | ||
</html> |
This file contains 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