Add .env.example and other minor fixes

This commit is contained in:
Adil Mohak 2024-07-28 23:04:46 +03:00
parent 42be8d47f6
commit 913a582e72
6 changed files with 38 additions and 6 deletions

28
.env.example Normal file
View File

@ -0,0 +1,28 @@
# =============================
# Database config
DB_NAME=dj_lms
DB_USER=postgres
DB_PASSWORD=pass123
DB_HOST=localhost
DB_PORT=5432
# =============================
# Email config
# For development or quick testing use console as the email backend
EMAIL_BACKEND="django.core.mail.backends.console.EmailBackend"
# For production use smtp, uncomment the below variable
# EMAIL_BACKEND="django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST="smtp.gmail.com"
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_FROM_ADDRESS="Dj LMS <youremail@example.com>"
EMAIL_HOST_USER="<youremail@example.com>"
EMAIL_HOST_PASSWORD="<your email password>"
# =============================
# Other
DEBUG=True
SECRET_KEY="<your_secret_key>"

View File

@ -195,7 +195,7 @@ EMAIL_BACKEND = config(
) )
EMAIL_HOST = config("EMAIL_HOST", default="smtp.gmail.com") EMAIL_HOST = config("EMAIL_HOST", default="smtp.gmail.com")
EMAIL_PORT = config("EMAIL_PORT", default=587) EMAIL_PORT = config("EMAIL_PORT", default=587)
EMAIL_USE_TLS = True EMAIL_USE_TLS = config("EMAIL_USE_TLS", default=True, cast=bool)
EMAIL_HOST_USER = config("EMAIL_HOST_USER") EMAIL_HOST_USER = config("EMAIL_HOST_USER")
EMAIL_HOST_PASSWORD = config("EMAIL_HOST_PASSWORD") EMAIL_HOST_PASSWORD = config("EMAIL_HOST_PASSWORD")
EMAIL_FROM_ADDRESS = config("EMAIL_FROM_ADDRESS") EMAIL_FROM_ADDRESS = config("EMAIL_FROM_ADDRESS")

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -955,6 +955,10 @@ a {
height: 34px; height: 34px;
background-color: rgba(0, 0, 0, 0.093); background-color: rgba(0, 0, 0, 0.093);
border-radius: 50%; border-radius: 50%;
&.unstyled {
background-color: unset;
border-radius: unset;
}
} }
/* Exclude styles for .fas and .fa elements inside dashboard page */ /* Exclude styles for .fas and .fa elements inside dashboard page */

View File

@ -92,10 +92,10 @@
{% endif %} {% endif %}
</div> </div>
<div class="p-2">{{ item.summary }}</div> <div class="p-2 my-2" style="min-height: 120px;">{{ item.summary }}</div>
<div class="date-wrapper"> <div class="bg-light p-1 small text-secondary text-end pe-3">
<i class="fa fa-calendar mr-2"></i> <i class="fa fa-calendar small unstyled"></i>
{{ item.updated_date|timesince }} ago {{ item.updated_date|timesince }} ago
</div> </div>