-
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 #41 from fromedwin/develop
Releave v0.9.2
- Loading branch information
Showing
25 changed files
with
271 additions
and
266 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from functools import wraps | ||
from django.contrib import messages | ||
from django.shortcuts import redirect | ||
from django.http import HttpResponse | ||
from django.shortcuts import render | ||
|
||
def user_approved_in_waiting_list(user): | ||
if user.is_staff: | ||
return True | ||
return False | ||
|
||
def waiting_list_approved_only(): | ||
def decorator(view): | ||
@wraps(view) | ||
def _wrapped_view(request, *args, **kwargs): | ||
if not user_approved_in_waiting_list(request.user): | ||
return render(request, 'waiting_list.html') | ||
return view(request, *args, **kwargs) | ||
return _wrapped_view | ||
return decorator |
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,30 @@ | ||
{% extends 'base.html' %} | ||
{% load socialaccount account tailwind_tags %} | ||
|
||
{% block body %} | ||
|
||
<div class="flex w-screen h-screen items-center justify-center"> | ||
<form method="post" class="py-5 space-y-8 divide-y divide-gray-200"> | ||
<div class="bg-white shadow sm:rounded-lg"> | ||
<div class="px-4 py-5 sm:p-6"> | ||
<h3 class="text-lg leading-6 font-medium text-gray-900"> | ||
|
||
</h3> | ||
<div class="mt-2 max-w-xl text-sm text-gray-500"> | ||
<p> | ||
You are currently on waiting list You can cancel at any time. | ||
</p> | ||
</div> | ||
<div class="mt-5 flex justify-between gap-8"> | ||
<a href="{% url 'user_delete' %}" class="whitespace-nowrap font-medium text-red-700 hover:text-red-600"> | ||
Delete your account | ||
</a> | ||
<a href="{% url 'logout' %}?next=/" class="whitespace-nowrap font-medium text-black-700 hover:text-black-600"> | ||
Logout | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock %} |
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
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
Oops, something went wrong.