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.17.1.tar.gz (96.8 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.17.1-py3-none-any.whl (100.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: plain_passwords-0.17.1.tar.gz
  • Upload date:
  • Size: 96.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"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.17.1.tar.gz
Algorithm Hash digest
SHA256 2debb53e219a7a2ce20f36a8cac08dda53bb5e8075c1a5be6aeca0f3594c2d7f
MD5 14f161840490267e9111f556e8eb4783
BLAKE2b-256 81fd7c03f867d95ad0018d58d9b72a1039b0ebe22c079a3024463b966e2e18c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: plain_passwords-0.17.1-py3-none-any.whl
  • Upload date:
  • Size: 100.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"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.17.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e57bdb6d4a7105c2fb044f99664adf8f28defe86696bdb487961936368e2764f
MD5 73d8e1dd9fc9115ce6d7e4d4b9459afb
BLAKE2b-256 cf8f21fae2744116fa02255744f3b4adc2a542518f3f33428bd1de8453001637

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