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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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