-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update user profile form fields and add new fields for LinkedIn URL, …
…GitHub URL, website URL, discounted hourly rate, and X username. Add users endpoint to URL patterns. Refactor admin page for tags to display additional fields and prepopulate slug field. Add migration files for tag and user profile changes. Remove unused CSS class in sidenav.html and leaderboard_global.html.
- Loading branch information
Showing
12 changed files
with
272 additions
and
26 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 5.0.7 on 2024-08-10 19:41 | ||
|
||
import django.utils.timezone | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("website", "0126_alter_userprofile_subscribed_domains_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="tag", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name="tag", | ||
name="slug", | ||
field=models.SlugField(default="", unique=True), | ||
preserve_default=False, | ||
), | ||
] |
37 changes: 37 additions & 0 deletions
37
website/migrations/0128_userprofile_discounted_hourly_rate_and_more.py
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,37 @@ | ||
# Generated by Django 5.0.7 on 2024-08-10 20:56 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("website", "0127_tag_created_tag_slug"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="discounted_hourly_rate", | ||
field=models.DecimalField(decimal_places=2, default=0, max_digits=10), | ||
), | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="github_url", | ||
field=models.URLField(blank=True, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="linkedin_url", | ||
field=models.URLField(blank=True, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="website_url", | ||
field=models.URLField(blank=True, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="x_username", | ||
field=models.CharField(blank=True, max_length=50, null=True), | ||
), | ||
] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{% extends "base.html" %} | ||
{% block style %} | ||
<style type="text/tailwindcss"> | ||
@layer components { | ||
.card { | ||
@apply flex items-center justify-center flex-col gap-2 p-5 w-full sm:w-72 h-full bg-gray-100 border rounded-2xl; | ||
} | ||
} | ||
</style> | ||
<!--Tailwind CSS--> | ||
<!--Font-Awesome--> | ||
<link rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" | ||
integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" | ||
crossorigin="anonymous" | ||
referrerpolicy="no-referrer" /> | ||
{% endblock style %} | ||
{% block content %} | ||
{% include "includes/sidenav.html" %} | ||
<div class="container py-8 min-h-[100vh]"> | ||
<div class="flex flex-col text-center gap-4 mb-10 p-4"> | ||
<div class="w-[full] h-max flex flex-col items-center"> | ||
<p class="text-7xl mb-5 font-bold">Meet our Community</p> | ||
</div> | ||
<div class="font=['Ubuntu'] max-sm:w-full w-3/4"> | ||
{% for tag_info in user_related_tags %} | ||
<button class="mr-3" | ||
onclick="window.location.href=`{% url 'users' %}?tag={{ tag_info.name }}`"> | ||
<div class="{% if tag_info.name == tag %}bg-red-600{% else %}[#f4f4f4]{% endif %} rounded-2xl p-3 m-2"> | ||
{{ tag_info.name }} | ||
</div> | ||
</button> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
<div class="flex items-center justify-center flex-wrap gap-4 p-4"> | ||
{% for user in users %} | ||
<div class="group card w-[250px] h-[400px] m-5 flex flex-col items-center justify-between hover:bg-red-600 transition duration-200"> | ||
<img src="{{ user.img }}" | ||
class="w-[100px] h-[100px] mb-3 rounded-full object-cover transition duration-200 group-hover:scale-110" | ||
width="100px" | ||
height="100px" | ||
alt="user image" /> | ||
<div class="transition duration-200 group-hover:text-white text-gray-900 text-4xl font-bold"> | ||
{{ user.user.username }} | ||
</div> | ||
<div class="transition duration-200 group-hover:text-purple-800 text-purple-600 text-2xl">{{ user.location }}</div> | ||
<p class="transition duration-200 group-hover:text-white text-gray-600 text-center px-10"> | ||
{{ user.short_description }} | ||
</p> | ||
<div class="group-hover:text-white flex items-center justify-center gap-3 mt-2 w-auto h-5 text-gray-600 mt-7"> | ||
<a href="{{ user.twitter }}" target="_blank" rel="noopener noreferrer"> | ||
<i class="group-hover:text-white scale-150 m-3 fa-brands fa-x-twitter fa-lg cursor-pointer transition duration-200 hover:text-gray-400"> | ||
</i> | ||
</a> | ||
<a href="{{ user.linkedin }}" target="_blank" rel="noopener noreferrer"> | ||
<i class="group-hover:text-white scale-150 m-3 fa-brands fa-linkedin fa-lg cursor-pointer transition duration-200 hover:text-gray-400"></i> | ||
</a> | ||
<a href="{{ user.website }}" target="_blank" rel="noopener noreferrer"> | ||
<i class="group-hover:text-white scale-150 m-3 fa-brands fa-dribbble fa-lg cursor-pointer transition duration-200 hover:text-gray-400"></i> | ||
</a> | ||
</div> | ||
<a href="{% url 'profile' slug=user.user.username %}" | ||
class="w-[150px] h-[40px] rounded-md shadow-md bg-red-500 text-white flex justify-center items-center mt-10 no-underline hover:text-white group-hover:bg-white group-hover:text-red-500 font-bold">More Info</a> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
{% endblock content %} |
Oops, something went wrong.