Skip to main content

Themes for Django-Allauth

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_allauth_themes-0.1.2.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

django_allauth_themes-0.1.2-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file django_allauth_themes-0.1.2.tar.gz.

File metadata

  • Download URL: django_allauth_themes-0.1.2.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for django_allauth_themes-0.1.2.tar.gz
Algorithm Hash digest
SHA256 eeff49b05daab816a7f3bde0524b83ac53fb8e34a93f6d6fd264c91b2d399518
MD5 d31b9d59e2312fdf1fe9b89106315b2a
BLAKE2b-256 37f315ae95519077e12911050500427d4c08565b644e8571f7d84541d02db50a

See more details on using hashes here.

File details

Details for the file django_allauth_themes-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_allauth_themes-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a915876d2c072995d895716b0379b1cdbf1b30dba9ff9a945dbda588c039b3ae
MD5 a99eb98f7bdbe145a86fa6334d35f38d
BLAKE2b-256 285bc3f04bffa7569c6084ce7de2bcf57d776fbb38db8d5b40b5ae297e9bf27b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page