Skip to content

Commit

Permalink
update for manual django messages rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
memphis-tools committed Aug 9, 2024
1 parent 59f2289 commit a1defd7
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 0 deletions.
Binary file added dummy_django_blog/media/avatars/dummy_image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/billet_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/dummy_image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions dummy_django_blog/static/assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,41 @@
font-style: normal;
}

/* Django message */
.django-messages li {
list-style: none;
}

.django-messages .success {
color: green;
background-color: #d4edda;
padding: 10px;
border-radius: 5px;
}

.django-messages .error {
color: red;
background-color: #f8d7da;
padding: 10px;
border-radius: 5px;
}

.django-messages .warning {
color: orange;
background-color: #fff3cd;
padding: 10px;
border-radius: 5px;
}

.django-messages .info {
color: blue;
background-color: #d1ecf1;
padding: 10px;
border-radius: 5px;
}

/* End Django messages */

body {
height: 100vh;
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.75) 20%, rgba(0, 0, 0, 0) 100%), url("../../vendors/img/les_petits_meurtres_saison_2_sans_titre.jpg");
Expand Down
11 changes: 11 additions & 0 deletions dummy_django_blog/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/styles.css' %}">
</head>
<body>
<div class="django-messages">
{% if messages %}
<ul>
{% for message in messages %}
<li class="{% if message.tags %}{{ message.tags }}{% endif %}">
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
</div>
<header>
<nav class="navbar navbar-light navbar-light sticky-top navbar-custom">
<div class="w-100 container-fluid">
Expand Down

0 comments on commit a1defd7

Please sign in to comment.