Skip to content

Commit

Permalink
global lint
Browse files Browse the repository at this point in the history
  • Loading branch information
almazkun committed Oct 13, 2023
1 parent 31cc982 commit a1055fd
Show file tree
Hide file tree
Showing 37 changed files with 420 additions and 272 deletions.
1 change: 0 additions & 1 deletion apps/articles/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
Expand Down
1 change: 0 additions & 1 deletion apps/articles/migrations/0002_tag_source_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [("articles", "0001_initial")]

operations = [
Expand Down
1 change: 0 additions & 1 deletion apps/articles/migrations/0003_auto_20200717_1302.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [("articles", "0002_tag_source_link")]

operations = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("articles", "0003_auto_20200717_1302"),
]
Expand Down
3 changes: 2 additions & 1 deletion apps/articles/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"price": 2000,
}


# Create your tests here.
class TestTagModel(TestCase):
def test_tag_model(self):
Expand Down Expand Up @@ -198,7 +199,7 @@ def setUp(self):
Article.objects.create(**test_article)

def test_article_detail(self):
obj = Article.objects.get(title=test_article["title"])
Article.objects.get(title=test_article["title"])
response = self.client.get(
reverse("article_detail", kwargs={"slug": test_article["slug"]})
)
Expand Down
1 change: 0 additions & 1 deletion apps/orders/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [("shop", "0002_auto_20200727_1759")]
Expand Down
1 change: 0 additions & 1 deletion apps/orders/migrations/0002_alter_order_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("orders", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/shop/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [("articles", "0003_auto_20200717_1302")]
Expand Down
1 change: 0 additions & 1 deletion apps/shop/migrations/0002_auto_20200727_1759.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [("shop", "0001_initial")]

operations = [
Expand Down
1 change: 0 additions & 1 deletion apps/shop/migrations/0003_alter_product_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("shop", "0002_auto_20200727_1759"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/tools/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [("articles", "0003_auto_20200717_1302")]
Expand Down
1 change: 0 additions & 1 deletion apps/tools/migrations/0002_alter_tool_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("tools", "0001_initial"),
]
Expand Down
1 change: 0 additions & 1 deletion apps/users/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [("auth", "0011_update_proxy_permissions")]
Expand Down
1 change: 0 additions & 1 deletion apps/users/migrations/0002_customuser_photo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [("users", "0001_initial")]

operations = [
Expand Down
1 change: 0 additions & 1 deletion apps/users/migrations/0003_auto_20200708_1128.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [("users", "0002_customuser_photo")]

operations = [
Expand Down
1 change: 0 additions & 1 deletion apps/users/migrations/0004_auto_20200708_1201.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [("users", "0003_auto_20200708_1128")]

operations = [
Expand Down
1 change: 0 additions & 1 deletion apps/users/migrations/0005_auto_20200708_1208.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [("users", "0004_auto_20200708_1201")]

operations = [
Expand Down
1 change: 0 additions & 1 deletion apps/users/migrations/0006_auto_20200708_1213.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [("users", "0005_auto_20200708_1208")]

operations = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [
("users", "0006_auto_20200708_1213"),
]
Expand Down
2 changes: 1 addition & 1 deletion apps/users/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TestAboutTemplateView(TestCase):
def setUp(self):
test_obj = normal_user
CustomUser.objects.create_user(main_user=True, **test_obj)
author = CustomUser.objects.get(username=test_obj["username"])
CustomUser.objects.get(username=test_obj["username"])
self.main_author = CustomUser.objects.get(username=test_obj["username"])
self.response = self.client.get(reverse("about"))

Expand Down
72 changes: 48 additions & 24 deletions templates/_base.html
Original file line number Diff line number Diff line change
@@ -1,58 +1,82 @@
{% load static %}

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="robots" content="index, follow" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">

<title>{% block title %}{% endblock title %} Python, Django, Almaz Kunpeissov</title>
<meta name="viewport"
content="width=device-width,minimum-scale=1,initial-scale=1">
<title>
{% block title %}
{% endblock title %}
Python, Django, Almaz Kunpeissov</title>
<meta name="author" content="Almaz Kunpeissov">
<meta name="description" content="{% block description %}{% endblock description %} Python, Django, Almaz Kunpeissov, Software Engineer, Software Developer, Web Developer"/>
<meta name="keywords" content="{% block keywords %}{% endblock keywords %} Python, Django, Almaz Kunpeissov, Software Engineer, Software Developer, Web Developer" />

<link rel="shortcut icon" type="image/x-icon" href="{% static 'images/fav/favicon.ico' %}">
<link rel="apple-touch-icon" sizes="180x180" href="{% static 'images/fav/apple-touch-icon.png' %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static 'images/fav/favicon-32x32.png' %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static 'images/fav/favicon-16x16.png' %}">
<meta name="description"
content="{% block description %}{% endblock description %} Python, Django, Almaz Kunpeissov, Software Engineer, Software Developer, Web Developer" />
<meta name="keywords"
content="{% block keywords %}{% endblock keywords %} Python, Django, Almaz Kunpeissov, Software Engineer, Software Developer, Web Developer" />
<link rel="shortcut icon"
type="image/x-icon"
href="{% static 'images/fav/favicon.ico' %}">
<link rel="apple-touch-icon"
sizes="180x180"
href="{% static 'images/fav/apple-touch-icon.png' %}">
<link rel="icon"
type="image/png"
sizes="32x32"
href="{% static 'images/fav/favicon-32x32.png' %}">
<link rel="icon"
type="image/png"
sizes="16x16"
href="{% static 'images/fav/favicon-16x16.png' %}">
<link rel="manifest" href="{% static 'images/fav/site.webmanifest' %}">
<link rel="mask-icon" href="{% static 'images/fav/safari-pinned-tab.svg' %}" color="#5bbad5">
<link rel="mask-icon"
href="{% static 'images/fav/safari-pinned-tab.svg' %}"
color="#5bbad5">
<link rel="shortcut icon" href="{% static 'images/fav/favicon.ico' %}">
<meta name="msapplication-TileColor" content="#000000">
<meta name="msapplication-config" content="{% static 'images/fav/browserconfig.xml' %}">
<meta name="msapplication-config"
content="{% static 'images/fav/browserconfig.xml' %}">
<meta name="theme-color" content="#ffffff">

{% block css %}
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
crossorigin="anonymous">
<link rel="stylesheet" href="{% static 'css/base.css' %}">
{% endblock %}
</head>

<body>
{% block navigation %}
{% include 'includes/navigation.html' %}
{% endblock navigation %}

{% block main_content %}
{% endblock main_content %}

{% block footer %}
{% include 'includes/footer.html' %}
{% endblock footer %}

{% block javascript %}
<!-- Bootstrap JavaScript -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"></script>
{% endblock javascript %}
<!-- Icons from https://fontawesome.com/-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
<link rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.4.1/css/all.css"
integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz"
crossorigin="anonymous">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-162961682-1"></script>
<script async
src="https://www.googletagmanager.com/gtag/js?id=UA-162961682-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
Expand Down
66 changes: 35 additions & 31 deletions templates/articles/article_detail.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@
{% extends "_base.html" %}
{% block title %}{{article.title|title}}{% endblock title %}
{% block title %}
{{ article.title|title }}
{% endblock title %}
{% block main_content %}
<section id="main" class="main">
<div class="container">
<div class="my-4">
<h1 class="display-4">{{ article.title }}</h1>
<p class="lead">{{ article.description }}<p>
<div class="mb-2">
{% for tag in article.tags.all %}
<a href="{{tag.get_absolute_url}}" class="text-muted">#{{tag.tag_name}}</a>
{% endfor %}
</div>
<div class="d-flex mb-2 align-items-center">
<a href="{{ article.get_absolute_url }}"><img class="rounded-circle author_photo" src="{{article.author.photo}}"></a>
<div class="ml-2 text-muted small">
<div>{{article.author.first_name}} {{article.author.last_name}}</div>
<div>
{% if article.created_on < article.updated_on %}
{{ article.updated_on|date:'M d, Y' }}
{% else %}
{{ article.created_on|date:'M d, Y' }}
{% endif %}
<p class="lead">
{{ article.description }}
<p>
<div class="mb-2">
{% for tag in article.tags.all %}
<a href="{{ tag.get_absolute_url }}" class="text-muted">#{{ tag.tag_name }}</a>
{% endfor %}
</div>
<div class="d-flex mb-2 align-items-center">
<a href="{{ article.get_absolute_url }}">
<img class="rounded-circle author_photo" src="{{ article.author.photo }}">
</a>
<div class="ml-2 text-muted small">
<div>{{ article.author.first_name }} {{ article.author.last_name }}</div>
<div>
{% if article.created_on < article.updated_on %}
{{ article.updated_on|date:'M d, Y' }}
{% else %}
{{ article.created_on|date:'M d, Y' }}
{% endif %}
</div>
</div>
</div>
<hr>
<img class="mb-2" src="{{ article.img_link }}">
<div class="article_content pb-4">{{ article.content|safe }}</div>
<div class="mb-2">
{% for tag in article.tags.all %}
<a href="{{ tag.get_absolute_url }}" class="text-muted">#{{ tag.tag_name }}</a>
{% endfor %}
</div>
</div>
</div>
<hr>
<img class="mb-2" src="{{ article.img_link }}">
<div class="article_content pb-4">
{{article.content|safe}}
</div>
<div class="mb-2">
{% for tag in article.tags.all %}
<a href="{{tag.get_absolute_url}}" class="text-muted">#{{tag.tag_name}}</a>
{% endfor %}
</div>
</div>
</div>
</section>
{% endblock main_content %}
</section>
{% endblock main_content %}
20 changes: 12 additions & 8 deletions templates/articles/articles.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{% extends "_base.html" %}
{% block title %}Articles{% endblock title %}
{% block title %}
Articles
{% endblock title %}
{% block main_content %}
<section id="main" class="main">
<div class="container">
<div class="my-4">
<h1 class="display-4">Articles</h1>
<p class="lead">Articles related to Python, Django and Software Development in general.<p>
<hr>
{% include 'includes/list_article.html' %}
</div>
</div>
</section>
{% endblock main_content %}
<p class="lead">
Articles related to Python, Django and Software Development in general.
<p>
<hr>
{% include 'includes/list_article.html' %}
</div>
</div>
</section>
{% endblock main_content %}
Loading

0 comments on commit a1055fd

Please sign in to comment.