Django Allauth Themes
Themes for django-allauth
Install
pip install django-allauth-themes
Settings
Add allauth_themes.bootstrap before allauth:
INSTALLED_APPS = [
...,
"allauth_themes.bootstrap",
"allauth",
...,
]
Customization
Bootswatch
You can achieve drastic changes with little effort using Bootswatch themes. Simply create a file in your templates directory to override the allauth/layouts/css.html file, with the following CDN link
<link href="https://cdn.jsdelivr.net/npm/bootswatch@5.3.3/dist/cerulean/bootstrap.min.css" rel="stylesheet">
You can change cerulean to any of the available themes available on Bootswatch.com.
Custom CSS
Alternatively, you can customize Bootstrap as you like and use that:
<link rel="stylesheet" href="{% static 'css/custom_bootstrap.css' %}">
Layout Customization
The layouts work with all Bootswatch themes, but you may want to customize them. As an example, these minor tweaks to the layouts may help the content stand out more. However, it doesn't work well with all Bootswatch themes (like quartz and vapor), so it's not included in the default layouts:
<div class="d-flex flex-grow-1 flex-shrink-0 py-5 bg-body-secondary">
<div class="m-auto p-4 border shadow-lg bg-white">
{% block content %}{% endblock %}
</div>
</div>
To apply these or other customizations, override the HTML files in your templates directory: templates/allauth/layouts/entrance.html. See it in action within the example project.
Metadata
Release files for django-allauth-themes 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_allauth_themes-0.1.2.tar.gz | 8.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_allauth_themes-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.5 kB
Release files / django_allauth_themes-0.1.2.tar.gz
| Download URL | django_allauth_themes-0.1.2.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eeff49b05daab816a7f3bde0524b83ac53fb8e34a93f6d6fd264c91b2d399518
|
|
BLAKE2b-256 checksum How to use checksums |
37f315ae95519077e12911050500427d4c08565b644e8571f7d84541d02db50a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / django_allauth_themes-0.1.2-py3-none-any.whl
| Download URL | django_allauth_themes-0.1.2-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a915876d2c072995d895716b0379b1cdbf1b30dba9ff9a945dbda588c039b3ae
|
|
BLAKE2b-256 checksum How to use checksums |
285bc3f04bffa7569c6084ce7de2bcf57d776fbb38db8d5b40b5ae297e9bf27b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|