django-userextensions
A user extension module for django. This includes some basic user profile settings and tracking of a users favorites and recently visited urls within the project.
| Author | David Slusser |
| Description | A user extension module for django. This includes some basic user profile settings and tracking of a users favorites and recently visited urls within the project. |
| Requirements | Python 3.xDjango 2.2.x |
Documentation
Full documentation can be found on http://django-userextensions.readthedocs.org. Documentation source files are available in the docs folder.
Installation
- pip install django-userextensions
- add userextensions to your INSTALLED_APPS
- to include recents tracking, add 'userextensions.middleware.UserRecentsMiddleware' to your middleware
- to include views to manage favorites and recents, in the project-level urls.py file add the following to your urls.py: from userextensions.urls import * path('', include('userextensions.urls'), ),
- run migrations python ./manage.py migrate userextensions
License
django-userextensions is licensed under the MIT license (see the LICENSE file for details).
Features
User Preferences
Extends the built-in User model to add theme, recents_count, page_refresh_time, and start_page fields.
User-Defined Start Page
Users can define a specific page to be routed to after login. This is set in the UserPreference model. To enable, add 'userextensions' to the INSTALLED_APPS and set the following in the settings.py file:
LOGIN_REDIRECT_URL = '/userextensions/user_login_redirect'
User Favorites
Each user can add/delete favorites, which stores specified URL. Views are provided to add the current url as a favorite, list user favorites, and delete favorites.
Recently viewed URLs
Each user can have recently viewed urls stored as a recent Views are provided to list and remove recents. Recents are added via middleware. To enable, add 'userextensions' to the INSTALLED_APPS and 'userextensions.middleware.UserRecentsMiddleware' to the MIDDLEWARE in the settings.py file. By default, some fixed URLs and URLs with specific prefixes are excluded from being stored in recents. These can be modified by setting the SKIP_URL_PREFIX_LIST and SKIP_FIXED_URL_LIST parameters in the settings.py file.
INSTALLED_APPS = [
...
'userextensions',
]
MIDDLEWARE = [
...
'userextensions.middleware.UserRecentsMiddleware',
]
SKIP_URL_PREFIX_LIST = ['/admin/', '/__debug__/']
SKIP_FIXED_URL_LIST = ['/', '/login/', '/logout/', ]
Provided Views
Several views, with applicable templates, are provided for use. To use these, add the following to your project-level urls.py:
from userextensions.urls import *
urlpatterns = [
...
path('', include('userextensions.urls'), ),
]
| View | Usage |
|---|---|
| list favorites | userextensions:list_favorites |
| list recents | userextensions:list_recents |
| delete favorite | userextensions:delete_favorite |
| delete recent | userextensions:delete_recent |
| add favorite | userextensions:add_favorite |
| set start page | userextensions:set_start_page |
| refresh API token | userextensions:refresh_api_token |
| detail user | userextensions:detail_user |
APIs
Metadata
Release files for django-userextensions 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_userextensions-0.3.3.tar.gz | 26.3 kB | Without provenance | Details for django_userextensions-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_userextensions-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for django_userextensions-0.3.3-py3-none-any.whl |
Total release size: 66.3 kB
Release files / django_userextensions-0.3.3.tar.gz
| Download URL | django_userextensions-0.3.3.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd6786b1e251acc5f66d3d77a30d5e3aca946392ff1f49c4de10ef767e5da104
|
|
BLAKE2b-256 checksum How to use checksums |
101cf3d8e30482e9b361d7fbc1be43d7388a79319bf1a2902440af18fca299b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / django_userextensions-0.3.3-py3-none-any.whl
| Download URL | django_userextensions-0.3.3-py3-none-any.whl |
|---|---|
| Size | 40.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c849c01cf4301c07cba49c6209ca7eedae489f6b64322c0916dae50489e6edf
|
|
BLAKE2b-256 checksum How to use checksums |
3117a9917fe50cbd987f286f54ccf099472f87feb8a38b673b65c14ad0e2b759
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Security for django-userextensions 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.