No project description provided
Project description
AllAuth UI
UI templates for django-allauth built with Tailwind. https://django-allauth-ui.hodovi.ch.
django-allauth is a great library, but the templates it provides out of the box are minimal html. I usually end up re-designing the login / logout / signup pages for each new Django project. This library aims at providing good defaults for new projects.
Table of contents
Features
- Responsive design suitable for device sizes from mobile to desktop
- Styled social login themes
- Additional error information when social logins fail
Translations
- English
Installation
troubleshooting? I can't see language.
Check deployed with
LANGUAGES = ( ("en", "English"), ("fr", "French"), ("es", _("Spanish")), ("pt-br", "Portuguese (Brazil)"), )
USE_I18N = True LANGUAGE_CODE = 'en' https://stackoverflow.com/q/1658720/2966951
Restrict supported languages (and JS media generation)
LANGUAGES = ( ('en', 'English'), ('fr', 'French'), )
MIDDLEWARE_CLASSES = ( 'ragendja.middleware.ErrorMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
i18n
'django.middleware.locale.LocaleMiddleware', ...
USE_I18N = True
pip install django-allauth-ui
pip install django-widget-tweaks
pip install slippers
django-allauth-ui depends on jazzband/django-widget-tweaks and mixxorz/slippers to render templates. Make sure to install both packages and add them to the INSTALLED_APPS.
Add django-allauth-ui before django-allauth in your INSTALLED_APPS. See ./tests/settings.py for an example.
INSTALLED_APPS = [
"allauth_ui",
"allauth",
"allauth.account",
"allauth.socialaccount",
"allauth.socialaccount.providers.github",
"widget_tweaks",
"slippers",
]
Note:
When going to production you should run python manage.py collectstatic
Hacking on the project
# Clone the repo
git clone git@github.com:danihodovic/django-allauth-ui.git
cd django-allauth-ui.git
# Create the virtual env
python -m venv .venv
# Activate the virtual env. This has to be done every time you enter the directory.
source .venv/bin/activate
# Install the dependencies
pip install --upgrade pip poetry
poetry install
# Install tailwind
npm install
# Run the migrations
./manage.py migrate
# Add sample social providers
./manage.py create_test_providers
# Start the server
./manage.py runserver_plus
# Start the tailwind compilation process in another terminal
npm run-script build:watch
Make changes in allauth_ui/templates and open the browser at http://localhost:8000/accounts/login/.
Once you're done compile tailwind with npm run-script build
and submit a pull-request 🃏
Contributors
Made with contrib.rocks.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_allauth_ui-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcb0d4b7f677a68fb7e5bf884806f6f72325d21707439d8da7afa7a0a02d5d9b |
|
MD5 | 7f68213ac0396f8fcc2ee4df74469a77 |
|
BLAKE2b-256 | 41fde0c799b87894afb87c6d55d5b75754fac3f086c18ca3dcaf13e3f0154ff8 |