### django_usermanagement
[![PyPI version](https://badge.fury.io/py/django_usermanagement.svg)](https://badge.fury.io/py/django_usermanagement)
![Downloads](https://img.shields.io/pypi/dm/django_usermanagement)
![License](https://img.shields.io/badge/license-MIT-blue)
`django_usermanagement_interface` is a Django app designed for efficient user profile management. It integrates seamlessly with Django's authentication system, providing a robust framework for user management.
### Features
- **User Profile Management**: Create, update, and view user profiles.
- **Bootstrap 5 Integration**: Enhances UI with Bootstrap 5.
- **Image Handling with Pillow**: Manage user profile pictures.
- **Automatic File Cleanup**: Uses `django-cleanup` to manage file deletion.
- **JWT Authentication**: Secure authentication with `pyjwt`.
- **Secure Encryption**: Uses `cryptography` for enhanced security.
- **django-allauth and django-htmx Integration**: Easy setup for user authentication and dynamic content.
### Installation
1. **Install the package:**
```sh
pip install django_usermanagement_interface
```
2. **Add to `INSTALLED_APPS`:**
```python
INSTALLED_APPS = [
...
'django_usermanagement',
]
```
3. **Include URLconf in `urls.py`:**
```python
from django.urls import path, include
urlpatterns = [
...
path('user/', include('django_usermanagement.urls')),
]
```
4. **Run migrations:**
```sh
python manage.py migrate
```
5. **Create a superuser:**
```sh
python manage.py createsuperuser
```
6. **Start the server:**
```sh
python manage.py runserver
```
7. **Access the app:**
- Admin panel: [http://127.0.0.1:8000/admin/](http://127.0.0.1:8000/admin/)
- User management: [http://127.0.0.1:8000/user-managment/](http://127.0.0.1:8000/user-managment/)
### URL Configuration
- `path('', ProfileView.as_view(), name="profile")`: Default profile view.
- `path('profile/', ProfileView.as_view(), name='profile')`: Profile view.
- `path('onboarding/', ProfileView.as_view(), name="profile-onboarding")`: Onboarding view.
- `path('profile/edit/', Profile_edit_View.as_view(), name='edit_profile')`: Edit profile view.
- `path('emailverify/', profile_email_verify, name="profile-email-verify")`: Email verification.
- `path('settings/', Profile_Settings_View.as_view(), name="profile-settings")`: Profile settings.
- `path('@<username>/', ProfileView.as_view(), name="profile")`: View profile by username.
### Models
**User Model:**
- `fields = ['username', 'email', 'password1', 'password2']`
- Widgets: Custom form controls for each field.
- Error handling and help texts.
**Profile Model:**
- `fields = ['profile_pic','display_name', 'bio', 'location', 'birth_date', 'website', 'facebook', 'twitter', 'instagram', 'linkedin']`
- Widgets: Custom form controls for each field.
### Forms
**UserForm:**
```python
class UserForm(forms.ModelForm):
class Meta:
model = User
fields = ('username', 'email', 'first_name', 'last_name')
widgets = {
'username': forms.TextInput(attrs={'class': 'form-control'}),
'email': forms.EmailInput(attrs={'class': 'form-control'}),
'first_name': forms.TextInput(attrs={'class': 'form-control'}),
'last_name': forms.TextInput(attrs={'class': 'form-control'}),
}
```
**ProfileForm:**
```python
class ProfileForm(forms.ModelForm):
class Meta:
model = Profile
fields = ['profile_pic','display_name', 'bio', 'location', 'birth_date', 'website', 'facebook', 'twitter', 'instagram', 'linkedin']
widgets = {
'profile_pic': forms.FileInput(attrs={'class': 'form-control'}),
'display_name': forms.TextInput(attrs={'class': 'form-control'}),
'bio': forms.Textarea(attrs={'class': 'form-control'}),
'location': forms.TextInput(attrs={'class': 'form-control'}),
'birth_date': forms.DateInput(attrs={'class': 'form-control'}),
'website': forms.URLInput(attrs={'class': 'form-control'}),
'facebook': forms.URLInput(attrs={'class': 'form-control'}),
'twitter': forms.URLInput(attrs={'class': 'form-control'}),
'instagram': forms.URLInput(attrs={'class': 'form-control'}),
'linkedin': forms.URLInput(attrs={'class': 'form-control'}),
}
```
### Templates and Static Files
Include these in your `MANIFEST.in`:
```
include README.md
include LICENSE
recursive-include usermanagement/templates *
recursive-include usermanagement/static *
```
### License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
### Contributing
Feel free to submit pull requests, create issues, or suggest features.
### Contact
Author: Hamed Jamali
Email: hamed.jamali.software@gmail.com
### Hashtags
#Django #UserManagement #Python #WebDevelopment #OpenSource
For more details, visit the [GitHub repository](https://github.com/hamed-jamali-software/usermanagement).
Raw data
{
"_id": null,
"home_page": null,
"name": "django-usermanagement-interface",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "django, user, management",
"author": "Hamed Jamali",
"author_email": "hamed.jamali.software@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a1/3b/7b90d812d1a0ff3f950003361136a358697c1759069c497411cc9d34e1c2/django_usermanagement_interface-1.4.3.tar.gz",
"platform": null,
"description": "### django_usermanagement\r\n\r\n[![PyPI version](https://badge.fury.io/py/django_usermanagement.svg)](https://badge.fury.io/py/django_usermanagement)\r\n![Downloads](https://img.shields.io/pypi/dm/django_usermanagement)\r\n![License](https://img.shields.io/badge/license-MIT-blue)\r\n\r\n`django_usermanagement_interface` is a Django app designed for efficient user profile management. It integrates seamlessly with Django's authentication system, providing a robust framework for user management.\r\n\r\n### Features\r\n- **User Profile Management**: Create, update, and view user profiles.\r\n- **Bootstrap 5 Integration**: Enhances UI with Bootstrap 5.\r\n- **Image Handling with Pillow**: Manage user profile pictures.\r\n- **Automatic File Cleanup**: Uses `django-cleanup` to manage file deletion.\r\n- **JWT Authentication**: Secure authentication with `pyjwt`.\r\n- **Secure Encryption**: Uses `cryptography` for enhanced security.\r\n- **django-allauth and django-htmx Integration**: Easy setup for user authentication and dynamic content.\r\n\r\n### Installation\r\n\r\n1. **Install the package:**\r\n ```sh\r\n pip install django_usermanagement_interface\r\n ```\r\n\r\n2. **Add to `INSTALLED_APPS`:**\r\n ```python\r\n INSTALLED_APPS = [\r\n ...\r\n 'django_usermanagement',\r\n ]\r\n ```\r\n\r\n3. **Include URLconf in `urls.py`:**\r\n ```python\r\n from django.urls import path, include\r\n\r\n urlpatterns = [\r\n ...\r\n path('user/', include('django_usermanagement.urls')),\r\n ]\r\n ```\r\n\r\n4. **Run migrations:**\r\n ```sh\r\n python manage.py migrate\r\n ```\r\n\r\n5. **Create a superuser:**\r\n ```sh\r\n python manage.py createsuperuser\r\n ```\r\n\r\n6. **Start the server:**\r\n ```sh\r\n python manage.py runserver\r\n ```\r\n\r\n7. **Access the app:**\r\n - Admin panel: [http://127.0.0.1:8000/admin/](http://127.0.0.1:8000/admin/)\r\n - User management: [http://127.0.0.1:8000/user-managment/](http://127.0.0.1:8000/user-managment/)\r\n\r\n### URL Configuration\r\n\r\n- `path('', ProfileView.as_view(), name=\"profile\")`: Default profile view.\r\n- `path('profile/', ProfileView.as_view(), name='profile')`: Profile view.\r\n- `path('onboarding/', ProfileView.as_view(), name=\"profile-onboarding\")`: Onboarding view.\r\n- `path('profile/edit/', Profile_edit_View.as_view(), name='edit_profile')`: Edit profile view.\r\n- `path('emailverify/', profile_email_verify, name=\"profile-email-verify\")`: Email verification.\r\n- `path('settings/', Profile_Settings_View.as_view(), name=\"profile-settings\")`: Profile settings.\r\n- `path('@<username>/', ProfileView.as_view(), name=\"profile\")`: View profile by username.\r\n\r\n### Models\r\n\r\n**User Model:**\r\n- `fields = ['username', 'email', 'password1', 'password2']`\r\n- Widgets: Custom form controls for each field.\r\n- Error handling and help texts.\r\n\r\n**Profile Model:**\r\n- `fields = ['profile_pic','display_name', 'bio', 'location', 'birth_date', 'website', 'facebook', 'twitter', 'instagram', 'linkedin']`\r\n- Widgets: Custom form controls for each field.\r\n\r\n### Forms\r\n\r\n**UserForm:**\r\n```python\r\nclass UserForm(forms.ModelForm):\r\n class Meta:\r\n model = User\r\n fields = ('username', 'email', 'first_name', 'last_name')\r\n widgets = {\r\n 'username': forms.TextInput(attrs={'class': 'form-control'}),\r\n 'email': forms.EmailInput(attrs={'class': 'form-control'}),\r\n 'first_name': forms.TextInput(attrs={'class': 'form-control'}),\r\n 'last_name': forms.TextInput(attrs={'class': 'form-control'}),\r\n }\r\n```\r\n\r\n**ProfileForm:**\r\n```python\r\nclass ProfileForm(forms.ModelForm):\r\n class Meta:\r\n model = Profile\r\n fields = ['profile_pic','display_name', 'bio', 'location', 'birth_date', 'website', 'facebook', 'twitter', 'instagram', 'linkedin']\r\n widgets = {\r\n 'profile_pic': forms.FileInput(attrs={'class': 'form-control'}),\r\n 'display_name': forms.TextInput(attrs={'class': 'form-control'}),\r\n 'bio': forms.Textarea(attrs={'class': 'form-control'}),\r\n 'location': forms.TextInput(attrs={'class': 'form-control'}),\r\n 'birth_date': forms.DateInput(attrs={'class': 'form-control'}),\r\n 'website': forms.URLInput(attrs={'class': 'form-control'}),\r\n 'facebook': forms.URLInput(attrs={'class': 'form-control'}),\r\n 'twitter': forms.URLInput(attrs={'class': 'form-control'}),\r\n 'instagram': forms.URLInput(attrs={'class': 'form-control'}),\r\n 'linkedin': forms.URLInput(attrs={'class': 'form-control'}),\r\n }\r\n```\r\n\r\n### Templates and Static Files\r\n\r\nInclude these in your `MANIFEST.in`:\r\n```\r\ninclude README.md\r\ninclude LICENSE\r\nrecursive-include usermanagement/templates *\r\nrecursive-include usermanagement/static *\r\n```\r\n\r\n### License\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\r\n\r\n### Contributing\r\n\r\nFeel free to submit pull requests, create issues, or suggest features.\r\n\r\n### Contact\r\n\r\nAuthor: Hamed Jamali \r\nEmail: hamed.jamali.software@gmail.com\r\n\r\n### Hashtags\r\n\r\n#Django #UserManagement #Python #WebDevelopment #OpenSource\r\n\r\nFor more details, visit the [GitHub repository](https://github.com/hamed-jamali-software/usermanagement).\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Django app to manage users",
"version": "1.4.3",
"project_urls": null,
"split_keywords": [
"django",
" user",
" management"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bb673c7b68c91f5c2c9e8769c31247f2d0f9b63ee47c60968ae2e638e8cbe52e",
"md5": "bf4381602d170dd13a5f2c8088bde971",
"sha256": "3059a4fd20923e71180787d240bd649e82e0b8ecd16882b63458c4c7536f41d6"
},
"downloads": -1,
"filename": "django_usermanagement_interface-1.4.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bf4381602d170dd13a5f2c8088bde971",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 239526,
"upload_time": "2024-07-20T13:12:43",
"upload_time_iso_8601": "2024-07-20T13:12:43.046211Z",
"url": "https://files.pythonhosted.org/packages/bb/67/3c7b68c91f5c2c9e8769c31247f2d0f9b63ee47c60968ae2e638e8cbe52e/django_usermanagement_interface-1.4.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a13b7b90d812d1a0ff3f950003361136a358697c1759069c497411cc9d34e1c2",
"md5": "98f0c0ffc36b9790563967ccac851d14",
"sha256": "4d6a92241747a5c06e4a789dc6bcd12209cf41d8912dc83e9e3f6e483ab92c57"
},
"downloads": -1,
"filename": "django_usermanagement_interface-1.4.3.tar.gz",
"has_sig": false,
"md5_digest": "98f0c0ffc36b9790563967ccac851d14",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 233245,
"upload_time": "2024-07-20T13:12:44",
"upload_time_iso_8601": "2024-07-20T13:12:44.821637Z",
"url": "https://files.pythonhosted.org/packages/a1/3b/7b90d812d1a0ff3f950003361136a358697c1759069c497411cc9d34e1c2/django_usermanagement_interface-1.4.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-20 13:12:44",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "django-usermanagement-interface"
}