Replaced ' with "

This commit is contained in:
Kristofers Solo 2023-06-30 01:01:42 +00:00
parent 4cd81de8ed
commit ba46c1cb37
8 changed files with 23 additions and 22 deletions

View File

@ -2,7 +2,7 @@
{% load static %} {% load static %}
{% block title %}{{ title }}{% endblock %} {% block title %}{{ title }}{% endblock %}
{% block meta %} {% block meta %}
<script src="{% static 'js/buttons.js' %}" defer></script> <script src="{% static "js/buttons.js" %}" defer></script>
{% endblock meta %} {% endblock meta %}
{% block content %} {% block content %}
<form method="post" <form method="post"
@ -14,7 +14,7 @@
class="button submit-button-disabled text-lightsteelblue-100 bg-slategray-200">Login</button> class="button submit-button-disabled text-lightsteelblue-100 bg-slategray-200">Login</button>
<p> <p>
Don't have an account? Create one <a class="underline text-skyblue-300 hover:text-cadetblue-300 transform duration-300 ease-linear" Don't have an account? Create one <a class="underline text-skyblue-300 hover:text-cadetblue-300 transform duration-300 ease-linear"
href="{% url 'signup' %}">Here</a>! href="{% url "signup" %}">Here</a>!
</p> </p>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -5,10 +5,10 @@
{% block content %} {% block content %}
<div class="py-8 px-32"> <div class="py-8 px-32">
<div class="flex justify-end gap-4"> <div class="flex justify-end gap-4">
<a href="{% url 'logout' %}"> <a href="{% url "logout" %}">
<i class="fa-solid fa-right-from-bracket fa-2xl"></i> <i class="fa-solid fa-right-from-bracket fa-2xl"></i>
</a> </a>
<a href="{% url 'settings' %}"> <a href="{% url "settings" %}">
<i class="fa-solid fa-gear fa-2xl"></i> <i class="fa-solid fa-gear fa-2xl"></i>
</a> </a>
</div> </div>

View File

@ -5,7 +5,7 @@
{% block content %} {% block content %}
<div class="py-8 px-32"> <div class="py-8 px-32">
<div class="flex justify-end"> <div class="flex justify-end">
<a href="{% url 'change_password' %}"> <a href="{% url "change_password" %}">
<i class="fa-solid fa-shield fa-2xl"></i> <i class="fa-solid fa-shield fa-2xl"></i>
</a> </a>
</div> </div>

View File

@ -2,7 +2,7 @@
{% load static %} {% load static %}
{% block title %}{{ title }}{% endblock %} {% block title %}{{ title }}{% endblock %}
{% block meta %} {% block meta %}
<script src="{% static 'js/buttons.js' %}" defer></script> <script src="{% static "js/buttons.js" %}" defer></script>
{% endblock meta %} {% endblock meta %}
{% block content %} {% block content %}
<form method="post" <form method="post"
@ -12,32 +12,32 @@
<input type="text" <input type="text"
placeholder="Username" placeholder="Username"
name="username" name="username"
value="{{ form.username.value|default:'' }}" value="{{ form.username.value|default:"" }}"
class="verify form-field submit-form" /> class="verify form-field submit-form" />
{% if form.username.errors %}<p class="text-indianred-100 text-xs italic">{{ form.username.errors }}</p>{% endif %} {% if form.username.errors %}<p class="text-indianred-100 text-xs italic">{{ form.username.errors }}</p>{% endif %}
<input type="email" <input type="email"
placeholder="Email (optional)" placeholder="Email (optional)"
name="email" name="email"
value="{{ form.email.value|default:'' }}" value="{{ form.email.value|default:"" }}"
class="form-field submit-form" /> class="form-field submit-form" />
{% if form.email.errors %}<p class="text-indianred-100 text-xs italic">{{ form.email.errors }}</p>{% endif %} {% if form.email.errors %}<p class="text-indianred-100 text-xs italic">{{ form.email.errors }}</p>{% endif %}
<input type="password" <input type="password"
placeholder="Password" placeholder="Password"
name="password1" name="password1"
value="{{ form.password1.value|default:'' }}" value="{{ form.password1.value|default:"" }}"
class="verify form-field submit-form" /> class="verify form-field submit-form" />
{% if form.password1.errors %}<p class="text-indianred-100 text-xs italic">{{ form.password1.errors }}</p>{% endif %} {% if form.password1.errors %}<p class="text-indianred-100 text-xs italic">{{ form.password1.errors }}</p>{% endif %}
<input type="password" <input type="password"
placeholder="Confirm password" placeholder="Confirm password"
name="password2" name="password2"
value="{{ form.password2.value|default:'' }}" value="{{ form.password2.value|default:"" }}"
class="verify form-field submit-form" /> class="verify form-field submit-form" />
{% if form.password2.errors %}<p class="text-indianred-100 text-xs italic">{{ form.password2.errors }}</p>{% endif %} {% if form.password2.errors %}<p class="text-indianred-100 text-xs italic">{{ form.password2.errors }}</p>{% endif %}
<button type="submit" <button type="submit"
id="submit-button" id="submit-button"
class="button submit-button-disabled text-lightsteelblue-100 bg-slategray-200" />Sign Up</button> class="button submit-button-disabled text-lightsteelblue-100 bg-slategray-200" />Sign Up</button>
<p> <p>
Have an account? Login <a class="underline text-skyblue-300" href="{% url 'login' %}">Here</a>! Have an account? Login <a class="underline text-skyblue-300" href="{% url "login" %}">Here</a>!
</p> </p>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -3,6 +3,7 @@ from django.contrib.auth import authenticate, login, logout, update_session_auth
from django.contrib.auth.forms import PasswordChangeForm from django.contrib.auth.forms import PasswordChangeForm
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import redirect, render from django.shortcuts import redirect, render
from django.urls import reverse_lazy
from django.views.generic import ListView, TemplateView, View from django.views.generic import ListView, TemplateView, View
from fossdb.models import Project from fossdb.models import Project
@ -12,7 +13,7 @@ from .forms import LoginForm, SignUpForm, UserChangeForm
class ProfileUpdateView(LoginRequiredMixin, TemplateView): class ProfileUpdateView(LoginRequiredMixin, TemplateView):
template_name = "setting.html" template_name = "setting.html"
login_url = "/login/" login_url = reverse_lazy("login")
redirect_field_name = "redirect_to" redirect_field_name = "redirect_to"
def get(self, request): def get(self, request):
@ -67,7 +68,7 @@ class ProfileProjectListView(LoginRequiredMixin, ListView):
model = Project model = Project
template_name = "profile.html" template_name = "profile.html"
context_object_name = "projects" context_object_name = "projects"
login_url = "/login/" login_url = reverse_lazy("login")
redirect_field_name = "redirect_to" redirect_field_name = "redirect_to"
def get_queryset(self): def get_queryset(self):

View File

@ -1,15 +1,15 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load static %} {% load static custom_filters %}
{% block title %}{{ project.owner }}/{{ project.name }}{% endblock %} {% block title %}{{ project.owner }}/{{ project.name }}{% endblock %}
{% block meta %} {% block meta %}
<script src="{% static 'js/buttons.js' %}" defer></script> <script src="{% static "js/buttons.js" %}" defer></script>
{% endblock meta %} {% endblock meta %}
{% block content %} {% block content %}
<div class="mx-auto font-condensed max-w-[60%] min-w-[32rem]"> <div class="mx-auto font-condensed max-w-[60%] min-w-[32rem]">
<div class="p-8"> <div class="p-8">
<h1 class="text-center text-4xl font-abel">{{ project.name }}</h1> <h1 class="text-center text-4xl font-abel">{{ project.name }}</h1>
<h2 class="text-center text-2xl font-abel"> <h2 class="text-center text-2xl font-abel">
<a href="{% url 'profile' project.owner.username %}">By <span class="underline">{{ project.owner }}</span></a> <a href="{% url "profile" project.owner.username %}">By <span class="underline">{{ project.owner }}</span></a>
</h2> </h2>
<!-- os platform icons --> <!-- os platform icons -->
<div class="my-4 flex justify-center items-center gap-x-4"> <div class="my-4 flex justify-center items-center gap-x-4">
@ -139,10 +139,10 @@
</div> </div>
{% if user == project.owner %} {% if user == project.owner %}
<div class="flex justify-between mt-8 mx-16"> <div class="flex justify-between mt-8 mx-16">
<a href="{% url 'project-update' project.owner project.name %}"> <a href="{% url "project-update" project.owner project.name %}">
<button class="button hover:bg-opacity-60 bg-mediumpurple-100 text-gray-500">Update</button> <button class="button hover:bg-opacity-60 bg-mediumpurple-100 text-gray-500">Update</button>
</a> </a>
<a href="{% url 'project-delete' project.owner project.name %}"> <a href="{% url "project-delete" project.owner project.name %}">
<button class="button hover:bg-opacity-60 bg-lightcoral text-gray-500">Delete</button> <button class="button hover:bg-opacity-60 bg-lightcoral text-gray-500">Delete</button>
</a> </a>
</div> </div>

View File

@ -4,13 +4,13 @@
{% block meta %}{% endblock %} {% block meta %}{% endblock %}
{% block content %} {% block content %}
<div class="py-8 px-16"> <div class="py-8 px-16">
<h1 class="font-abel text-4xl mb-8">Projects</h1> <h1 class="font-abel text-4xl mb-8 font-bold">Projects</h1>
<div class="grid grid-cols-2 gap-4"> <div class="grid grid-cols-2 gap-4">
{% for project in projects %} {% for project in projects %}
<div class="border border-steelblue-100 p-8 flex flex-row gap-4 justify-between"> <div class="border border-steelblue-100 p-8 flex flex-row gap-4 justify-between">
<a href="{{ project.get_absolute_url }}" <a href="{{ project.get_absolute_url }}"
class="hover:text-steelblue-100 transition duration-300 ease-linear"> class="hover:text-steelblue-100 transition duration-300 ease-linear">
<h2 class="font-abel text-2xl">{{ project.name }}</h2> <h2 class="font-abel text-3xl font-semibold">{{ project.name }}</h2>
</a> </a>
<p class="max-w-xs text-justify">{{ project.description|slice:500 }}</p> <p class="max-w-xs text-justify">{{ project.description|slice:500 }}</p>
</div> </div>

View File

@ -2,5 +2,5 @@ from django.apps import AppConfig
class MainConfig(AppConfig): class MainConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField' default_auto_field = "django.db.models.BigAutoField"
name = 'main' name = "main"