Saves the current user with an Aldryn Form for DjangoCMS.
Project description
An extension to the Aldryn Forms plugin that adds a Current User form field type. If there is a valid logged-in user session (request.user), that user’s information will be saved along with the form submission.
When you build your form, you can select to save the user’s:
User ID
Username
Email Address
Full Name
A “Current User Email Field” is also available that provides the same funcationality of the Aldryn Forms Email Field, allowing you to send the user who submitted the form an email confirmation.
Installation
Install via pip:
pip install djangocms-currentuser-field
Add to your INSTALLED_APPS (in settings.py):
INSTALLED_APPS = ( ... 'djangocms-currentuser-field', ... ) # Optional, if you'd like to use a subclass (1:1 relationship) attached # to user for the user id field, specify below CURRENTUSER_FIELD_USER_SUBCLASS = 'staff' # Optional, if you'd like to specify a custom fields off the user or # sub-user class, set a list of tuples: CURRENTUSER_FIELD_CUSTOM_VALUES = [ ('canvote', 'Voting Status') ]
Run migrations:
python manage.py migrate djangocms-current-user
“Current User Field” should now be available as a plugin in the CMS when you build a form!
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
File details
Details for the file djangocms-currentuser-field-0.6.tar.gz
.
File metadata
- Download URL: djangocms-currentuser-field-0.6.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4396c06f03d4be9a88d7bb791884379a6c57c7dfe810aa4b2d2b97fe276fe99 |
|
MD5 | 12fc28940cd6e4ac2a0a3e0f8da668f6 |
|
BLAKE2b-256 | 7e61facd13d7431a31650efebe8e0dfe5337522c79b3af0f78b65bc8b60ddb53 |
File details
Details for the file djangocms_currentuser_field-0.6-py3-none-any.whl
.
File metadata
- Download URL: djangocms_currentuser_field-0.6-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de41b522d50c2756ad7f8095aa5bd36e36bc9afd5db434b6d4a7de03fafd3b8e |
|
MD5 | 94e800e21ed0d23b3245cbb6f5de47ae |
|
BLAKE2b-256 | db205b96cf16ed9842f7b29108ba2152bbb107dd28fe6cb330fdb1046486dbdf |