Skip to content

Commit 1d3d3b4

Browse files
committed
Upgrade project to Bootstrap v5
According to the official Bootstrap migration guides: * https://getbootstrap.com/docs/4.0/migration/ * https://getbootstrap.com/docs/5.0/migration/ Apparently, the only change affecting this project comes from the v4 migration guide: > * Renamed .btn-default to .btn-secondary.
1 parent 2ab4e5e commit 1d3d3b4

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

en/css/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ To install Bootstrap, open up your `.html` file in the code editor and add this
2020

2121
{% filename %}blog/templates/blog/post_list.html{% endfilename %}
2222
```html
23-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
23+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
2424
```
2525

2626
This doesn't add any files to your project. It just points to files that exist on the Internet. So go ahead, open your website and refresh the page. Here it is!
@@ -119,7 +119,7 @@ Your file should now look like this:
119119
<html>
120120
<head>
121121
<title>Django Girls blog</title>
122-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
122+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
123123
<link rel="stylesheet" href="{% static 'css/blog.css' %}">
124124
</head>
125125
<body>
@@ -266,14 +266,14 @@ h4 {
266266
float: right;
267267
}
268268

269-
.btn-default,
270-
.btn-default:visited {
269+
.btn-secondary,
270+
.btn-secondary:visited {
271271
color: #C25100;
272272
background: none;
273273
border-color: #C25100;
274274
}
275275

276-
.btn-default:hover {
276+
.btn-secondary:hover {
277277
color: #FFFFFF;
278278
background-color: #C25100;
279279
}

en/django_forms/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ After editing the line, your HTML file should now look like this:
7070
<html>
7171
<head>
7272
<title>Django Girls blog</title>
73-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
73+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
7474
<link href='//fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
7575
<link rel="stylesheet" href="{% static 'css/blog.css' %}">
7676
</head>
@@ -163,7 +163,7 @@ OK, so let's see how the HTML in `post_edit.html` should look:
163163
<h2>New post</h2>
164164
<form method="POST" class="post-form">{% csrf_token %}
165165
{{ form.as_p }}
166-
<button type="submit" class="save btn btn-default">Save</button>
166+
<button type="submit" class="save btn btn-secondary">Save</button>
167167
</form>
168168
{% endblock %}
169169
```
@@ -290,7 +290,7 @@ Open `blog/templates/blog/post_detail.html` in the code editor and add the follo
290290
{% filename %}blog/templates/blog/post_detail.html{% endfilename %}
291291
```html
292292
<aside class="actions">
293-
<a class="btn btn-default" href="{% url 'post_edit' pk=post.pk %}">
293+
<a class="btn btn-secondary" href="{% url 'post_edit' pk=post.pk %}">
294294
{% include './icons/pencil-fill.svg' %}
295295
</a>
296296
</aside>
@@ -305,7 +305,7 @@ so that the template will look like this:
305305
{% block content %}
306306
<article class="post">
307307
<aside class="actions">
308-
<a class="btn btn-default" href="{% url 'post_edit' pk=post.pk %}">
308+
<a class="btn btn-secondary" href="{% url 'post_edit' pk=post.pk %}">
309309
{% include './icons/pencil-fill.svg' %}
310310
</a>
311311
</aside>
@@ -408,7 +408,7 @@ Open `blog/templates/blog/post_detail.html` in the code editor and find this lin
408408

409409
{% filename %}blog/templates/blog/post_detail.html{% endfilename %}
410410
```html
411-
<a class="btn btn-default" href="{% url 'post_edit' pk=post.pk %}">
411+
<a class="btn btn-secondary" href="{% url 'post_edit' pk=post.pk %}">
412412
{% include './icons/pencil-fill.svg' %}
413413
</a>
414414
```
@@ -418,7 +418,7 @@ Change it to this:
418418
{% filename %}blog/templates/blog/post_detail.html{% endfilename %}
419419
```html
420420
{% if user.is_authenticated %}
421-
<a class="btn btn-default" href="{% url 'post_edit' pk=post.pk %}">
421+
<a class="btn btn-secondary" href="{% url 'post_edit' pk=post.pk %}">
422422
{% include './icons/pencil-fill.svg' %}
423423
</a>
424424
{% endif %}

en/template_extending/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Then open it up in the code editor and copy everything from `post_list.html` to
2727
<html>
2828
<head>
2929
<title>Django Girls blog</title>
30-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
30+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
3131
<link href='//fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
3232
<link rel="stylesheet" href="{% static 'css/blog.css' %}">
3333
</head>

0 commit comments

Comments
 (0)