-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
32 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
from django.shortcuts import render | ||
from django.contrib.auth.decorators import login_required | ||
from subscriptions.models import UserSubscription | ||
|
||
# Create your views here. | ||
@login_required | ||
def dashboard_view(request): | ||
return render(request, "dashboard/main.html", {}) | ||
user_sub_obj, created = UserSubscription.objects.get_or_create(user=request.user) | ||
return render(request, "dashboard/main.html", { | ||
"subscription": user_sub_obj | ||
}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,14 @@ | ||
{% load static %} | ||
|
||
<div class="col-span-1 flex flex-col justify-center items-center"> | ||
<div class="w-full max-w-sm bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700"> | ||
<div class="flex flex-col items-center pb-10"> | ||
<div class="flex-shrink-0 mb-3"> | ||
<img class="w-1/2 h-auto rounded-full shadow-lg" src="{% static "images/avatars/3.webp" %}" alt="user img"/> | ||
</div> | ||
<h5 class="mb-1 text-xl font-medium text-gray-900 dark:text-white">{{ request.user.username }}</h5> | ||
<span class="text-sm py-2 text-gray-500 dark:text-gray-400">{{ request.user.email }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
|