Skip to main content

Password-based login for Plain.

Project description

plain.password

Password authentication for Plain.

Usage

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.as_view(), name='login'),
    # ...
]

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

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 PasswordLoginView 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.as_view(), name='login'),
    # ...
]

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.3.2.tar.gz (105.2 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.3.2-py3-none-any.whl (101.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: plain_passwords-0.3.2.tar.gz
  • Upload date:
  • Size: 105.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.30

File hashes

Hashes for plain_passwords-0.3.2.tar.gz
Algorithm Hash digest
SHA256 c89f14eabdc54e1ec85f7ecceb3aa31c92d51267c079d5476797b03eba5938cd
MD5 d495a80051b14c49967db61df74f69d4
BLAKE2b-256 22a812538ba8158ad44c013be8e87902e3820e16a8def1d549db68ea8779f7e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plain_passwords-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 45fe9a4fb0d17dc900e2a2804ef62012c11d248046c48cfa87d20b65b40057b8
MD5 c5ffac472411600faf154dc8075327ad
BLAKE2b-256 8b46ad8e304dad0f987fca10b27699bf1907e9d9782d5f161dee01f74186b3f5

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