Skip to main content

Password authentication for Plain.

Project description

plain.passwords

Password authentication for Plain.

Overview

To enable password authentication in your Plain application, add the PasswordLoginView to your urls.py:

# app/urls.py
from plain.urls import path
from plain.passwords.views import PasswordLoginView

urlpatterns = [
    path('login/', PasswordLoginView, name='login'),
    # ...
]

This sets up a basic login view where users can authenticate using their email and password.

For password resets to work, you also need to install plain.email.

FAQs

How do I customize the login form?

To customize the login form, you can subclass PasswordLoginForm and override its fields or methods as needed. Then, set the form_class attribute in your view to use your custom form.

# app/forms.py
from plain.passwords.forms import PasswordLoginForm

class MyCustomLoginForm(PasswordLoginForm):
    # Add custom fields or override methods here
    pass

# app/views.py
from plain.passwords.views import PasswordLoginView
from .forms import MyCustomLoginForm

class MyPasswordLoginView(PasswordLoginView):
    form_class = MyCustomLoginForm

Update your urls.py to use your custom view:

# app/urls.py
from plain.urls import path
from .views import MyPasswordLoginView

urlpatterns = [
    path('login/', MyPasswordLoginView, name='login'),
    # ...
]

Installation

Install the plain.passwords package from PyPI:

uv add plain.passwords

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

plain_passwords-0.20.0.tar.gz (97.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plain_passwords-0.20.0-py3-none-any.whl (100.7 kB view details)

Uploaded Python 3

File details

Details for the file plain_passwords-0.20.0.tar.gz.

File metadata

  • Download URL: plain_passwords-0.20.0.tar.gz
  • Upload date:
  • Size: 97.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for plain_passwords-0.20.0.tar.gz
Algorithm Hash digest
SHA256 bd547f5167b62ad040017f243adf7bda4325a2ef965f56c29fa89f9a41bed596
MD5 d06f998bcc7e61acb9a6af9979fee532
BLAKE2b-256 dcc125cc5fce28ac26e0f810c2553728d9932af4044ee03c5acf45f26b6220b0

See more details on using hashes here.

File details

Details for the file plain_passwords-0.20.0-py3-none-any.whl.

File metadata

  • Download URL: plain_passwords-0.20.0-py3-none-any.whl
  • Upload date:
  • Size: 100.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for plain_passwords-0.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ddcbb57ecc8b9240eb4abdf169a1940c470cdf25183b06f8596b40651e13e79f
MD5 46543d8aa5bdddaf10f6af74860d5299
BLAKE2b-256 2ca3ca010a7a7206773172be5927de72ef61bc0070234d6032012143feda545c

See more details on using hashes here.

Supported by

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