No description
  • CSS 62.3%
  • Python 23%
  • Shell 7.9%
  • HTML 5.9%
  • Perl 0.8%
  • Other 0.1%
Find a file Use this template
2026-06-05 23:15:56 +02:00
.data 2026.05.18 14:53:43 (workstation) 2026-05-18 14:53:43 +02:00
.run.d Initial commit 2026-05-08 20:19:39 +02:00
.vscode Initial commit 2026-05-08 20:19:39 +02:00
django_project 2026.06.05 23:15:56 (workstation) 2026-06-05 23:15:56 +02:00
django_tinyuser 2026.06.05 23:15:56 (workstation) 2026-06-05 23:15:56 +02:00
doc 2026.06.05 23:15:56 (workstation) 2026-06-05 23:15:56 +02:00
dockerfiles Initial commit 2026-05-08 20:19:39 +02:00
git.hooks 2026.05.25 19:03:51 (workstation) 2026-05-25 19:03:51 +02:00
httpd Initial commit 2026-05-08 20:19:39 +02:00
staticfiles 2026.05.20 03:19:27 (workstation) 2026-05-20 03:19:27 +02:00
.container-images.yaml 2026.05.25 19:03:51 (workstation) 2026-05-25 19:03:51 +02:00
.dockerignore Initial commit 2026-05-08 20:19:39 +02:00
.flake8 2026.05.25 19:03:51 (workstation) 2026-05-25 19:03:51 +02:00
.gitattributes 2026.05.18 05:48:38 (workstation) 2026-05-18 05:48:38 +02:00
.gitignore 2026.06.04 21:34:43 (workstation) 2026-06-04 21:34:43 +02:00
.gitmodules 2026.06.02 17:45:17 (workstation) 2026-06-02 17:45:17 +02:00
Dockerfile Initial commit 2026-05-08 20:19:39 +02:00
imagetab Initial commit 2026-05-08 20:19:39 +02:00
LICENSE 2026.05.18 05:48:38 (workstation) 2026-05-18 05:48:38 +02:00
LICENSE.django-project 2026.05.18 05:48:38 (workstation) 2026-05-18 05:48:38 +02:00
LICENSE.django-project.md 2026.05.18 05:48:38 (workstation) 2026-05-18 05:48:38 +02:00
LICENSE.django-tinyuser 2026.05.20 03:19:27 (workstation) 2026-05-20 03:19:27 +02:00
LICENSE.django-tinyuser.md 2026.05.20 03:19:27 (workstation) 2026-05-20 03:19:27 +02:00
LICENSE.md 2026.05.18 05:48:38 (workstation) 2026-05-18 05:48:38 +02:00
manage 2026.05.18 05:48:38 (workstation) 2026-05-18 05:48:38 +02:00
manage.py Initial commit 2026-05-08 20:19:39 +02:00
manage.sh Initial commit 2026-05-08 20:19:39 +02:00
package-lock.json 2026.05.18 05:48:38 (workstation) 2026-05-18 05:48:38 +02:00
package.json 2026.05.18 05:48:38 (workstation) 2026-05-18 05:48:38 +02:00
pmanage.sh Initial commit 2026-05-08 20:19:39 +02:00
podman-build.sh Initial commit 2026-05-08 20:19:39 +02:00
podman-push.sh Initial commit 2026-05-08 20:19:39 +02:00
poetry.lock 2026.06.04 21:34:43 (workstation) 2026-06-04 21:34:43 +02:00
pyproject.toml 2026.06.04 21:34:43 (workstation) 2026-06-04 21:34:43 +02:00
README.md 2026.06.04 21:34:43 (workstation) 2026-06-04 21:34:43 +02:00
requirements.dev.txt Initial commit 2026-05-08 20:19:39 +02:00
requirements.prod.txt Initial commit 2026-05-08 20:19:39 +02:00
requirements.txt Initial commit 2026-05-08 20:19:39 +02:00
run.sh Initial commit 2026-05-08 20:19:39 +02:00
update-requirements.sh Initial commit 2026-05-08 20:19:39 +02:00

Django TinyUser

Neither the app nor the documentation is finished yet, but I wanted to publish the project anyway, because I need it for my projects and I want to share it with others. If you want to contribute to the project, feel free to open a pull request or an issue.

Django TinyUser is a small user authentication app for django. It is meant to be used by projects that need a small user authentication for their projects and don't want to implement their own. It is used by my projects and docker images for basic user authentication using django-allauth.

This project is distributed under the 0BSD-License.

It uses django-allauth as backend and overloads the templates for Bootstrap and Tailwind CSS.

Installation

Add TinyUser to your project using poetry

poetry add https+git://codeberg.org/c9moser/django-tinyuser.git

Configuration of your project

from django_tinyuser.global_templates.tailwindcss import PATH as TINYUSER_GLOBAL_TEMPLATES
...
# Register allauth and django_tinyuser
APPS = [
    ...
    'allauth',
    'allauth.account',
    'allauth.socialaccount', # if you want to use social auth
    # add the providers you want to use, e.g. 'allauth.socialaccount.providers.google',
    'django_tinyuser',
    ...
]

If you use Bootstrap, you can add overloads to your TEMPLATES. The overloads are located in the global_templates folder of django_tinyuser. You can add them to your TEMPLATES like this is and they will be used instead of the default templates of django-allauth.

Note that you have to add the path to the overloads before the default templates of django-allauth, otherwise they will not be used.

And don't forget to add the context processors for django-allauth, and django-tinyuser otherwise the templates will not work.

from django_tinyuser.global_templates.bootstrap import PATH as TINYUSER_GLOBAL_TEMPLATES
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        # Add Bootstrap overloads to TEMPLATES
        'DIRS': [TINYUSER_GLOBAL_TEMPLATES],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                ...
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
                'django_tinyuser.context_processors.tinyuser'
                ...
            ],
        },
    },
...
]

If you use Tailwind CSS, you can add the overloads to your TEMPLATES like this is and they will be used instead of the default templates of django-allauth.

from django_tinyuser.global_templates.tailwindcss import PATH as TINYUSER_GLOBAL_TEMPLATES
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        # Add Tailwind CSS overloads to TEMPLATES
        'DIRS': [TINYUSER_GLOBAL_TEMPLATES],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                ...
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
                'django_tinyuser.context_processors.tinyuser'
                ...
            ],
        },
    },
...
]

You also need to set the CSS_FRAMEWORK option in your settings.py to the css framework you use, otherwise the templates will not work.

CSS_FRAMEWORK = 'bootstrap' # if you use Bootstrap
# or
CSS_FRAMEWORK = 'tailwindcss' # if you use Tailwind CSS
# or
CSS_FRAMEWORK = 'custom' # if you use custom templates

And you need to set the AUTH_USER_MODEL to django_tinyuser.TinyUser in your settings.py or to an overloaded model if you have customized the user model.

AUTH_USER_MODEL = 'django_tinyuser.TinyUser'

Then add the urls of django-allauth to your urls.py

from django.urls import path, include
urlpatterns = [
    ...
    path('accounts/', include('allauth.urls')),
    ...
]

Finally run the migrations to create the required tables added by required apps, django-allauth and django-tinyuser.

    python manage.py migrate

Configuration options to be added to your settings.py

CSS_FRAMEWORK

One of the following values:

  • bootstrap - if you use Bootstrap (partially implemented, but not tested yet)
  • tailwindcss - if you use Tailwind CSS (not implemented yet)
  • custom - custom template (you need to overload all templates yourself and add the path to your TEMPLATES)

Note that the default value is 'bootstrap', so if you use Bootstrap, you don't need to set this option.

If you use Tailwind CSS, you need to set this option to 'tailwindcss', otherwise the templates will not work.

You can contact me under my Mastodon account if you have any questions or suggestions for the project. I am also open for contributions, so if you want to contribute to the project, feel free to open a pull request or an issue.