django-userextensions


Namedjango-userextensions JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/davidslusser/django-userextensions
SummaryA user extension module for django
upload_time2024-03-06 22:57:16
maintainer
docs_urlNone
authorDavid Slusser
requires_python
licenseGPL-3.0
keywords django helpers extension user profile
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.x`<br>`Django 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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/davidslusser/django-userextensions",
    "name": "django-userextensions",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "django,helpers,extension,user,profile",
    "author": "David Slusser",
    "author_email": "dbslusser@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4b/0e/10013dc8081395ee130e9261d3a9fdee10b4eec25859e4e5e3b12fb578a3/django-userextensions-0.3.2.tar.gz",
    "platform": null,
    "description": "# django-userextensions\nA user extension module for django. This includes some basic user profile settings and \ntracking of a users favorites and recently visited urls within the project. \n\n| | |\n|--------------|------|\n| Author       | David Slusser |\n| 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. |\n| Requirements | `Python 3.x`<br>`Django 2.2.x` |\n\n\n# Documentation\nFull documentation can be found on http://django-userextensions.readthedocs.org. \nDocumentation source files are available in the docs folder.\n\n\n# Installation \n- pip install django-userextensions\n- add userextensions to your INSTALLED_APPS\n- to include recents tracking, add 'userextensions.middleware.UserRecentsMiddleware' to your middleware\n- to include views to manage favorites and recents, in the project-level urls.py file add the following to your urls.py:\n    from userextensions.urls import *\n    path('', include('userextensions.urls'), ), \n- run migrations python ./manage.py migrate userextensions\n\n\n# License\ndjango-userextensions is licensed under the MIT license (see the LICENSE file for details).\n\n\n# Features\n\n### User Preferences\nExtends the built-in User model to add theme, recents_count, page_refresh_time, and start_page fields.\n\n### User-Defined Start Page\nUsers can define a specific page to be routed to after login. This is set in the UserPreference model.\nTo enable, add 'userextensions' to the INSTALLED_APPS and set the following in the settings.py file: \n\n    LOGIN_REDIRECT_URL = '/userextensions/user_login_redirect'\n\n### User Favorites\nEach 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.\n\n### Recently viewed URLs\nEach user can have recently viewed urls stored as a recent Views are provided to list and remove recents. Recents are added via middleware. \nTo enable, add 'userextensions' to the INSTALLED_APPS and 'userextensions.middleware.UserRecentsMiddleware' to the MIDDLEWARE in the settings.py file. \nBy 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.\n\n    INSTALLED_APPS = [\n        ...\n        'userextensions',\n    ]\n\n    MIDDLEWARE = [\n        ...\n        'userextensions.middleware.UserRecentsMiddleware',\n    ]\n\n    SKIP_URL_PREFIX_LIST = ['/admin/', '/__debug__/']\n    SKIP_FIXED_URL_LIST = ['/', '/login/', '/logout/', ]\n\n\n# Provided Views\nSeveral views, with applicable templates, are provided for use. To use these, add the following to your project-level urls.py:\n\n    from userextensions.urls import *\n    \n    urlpatterns = [\n        ...\n        path('', include('userextensions.urls'), ),\n    ]\n\n\n| View | Usage |\n|--------------|------|\n| list favorites | userextensions:list_favorites |\n| list recents  | userextensions:list_recents |\n| delete favorite | userextensions:delete_favorite |\n| delete recent | userextensions:delete_recent |\n| add favorite | userextensions:add_favorite |\n| set start page | userextensions:set_start_page |\n| refresh API token | userextensions:refresh_api_token |\n| detail user | userextensions:detail_user |\n\n\n# APIs\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "A user extension module for django",
    "version": "0.3.2",
    "project_urls": {
        "Download": "https://github.com/davidslusser/django-userextensions/archive/0.3.2.tar.gz",
        "Homepage": "https://github.com/davidslusser/django-userextensions"
    },
    "split_keywords": [
        "django",
        "helpers",
        "extension",
        "user",
        "profile"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12256d51cc12e08e190a3b0a75812252cf81f21d69a089bbc84a5f51b8197537",
                "md5": "e31271dcc7c13baacba604084784beaa",
                "sha256": "1ff0b3be8868e793be8a5243faed5a084c3e45cfd54f2209404ea8883c1af300"
            },
            "downloads": -1,
            "filename": "django_userextensions-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e31271dcc7c13baacba604084784beaa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 39935,
            "upload_time": "2024-03-06T22:57:14",
            "upload_time_iso_8601": "2024-03-06T22:57:14.625569Z",
            "url": "https://files.pythonhosted.org/packages/12/25/6d51cc12e08e190a3b0a75812252cf81f21d69a089bbc84a5f51b8197537/django_userextensions-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b0e10013dc8081395ee130e9261d3a9fdee10b4eec25859e4e5e3b12fb578a3",
                "md5": "06001b2f344f93d5d67b0797bff93855",
                "sha256": "8b4a45a50fa8b7c6d522a98e983bdb5196a69e7f9135f5e36305cc23a5157779"
            },
            "downloads": -1,
            "filename": "django-userextensions-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "06001b2f344f93d5d67b0797bff93855",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 26209,
            "upload_time": "2024-03-06T22:57:16",
            "upload_time_iso_8601": "2024-03-06T22:57:16.301669Z",
            "url": "https://files.pythonhosted.org/packages/4b/0e/10013dc8081395ee130e9261d3a9fdee10b4eec25859e4e5e3b12fb578a3/django-userextensions-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-06 22:57:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "davidslusser",
    "github_project": "django-userextensions",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "django-userextensions"
}
        
Elapsed time: 0.21300s