A Django app to manage users
Project description
django_usermanagement
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-cleanupto manage file deletion. - JWT Authentication: Secure authentication with
pyjwt. - Secure Encryption: Uses
cryptographyfor enhanced security. - django-allauth and django-htmx Integration: Easy setup for user authentication and dynamic content.
Installation
-
Install the package:
pip install django_usermanagement_interface
-
Add to
INSTALLED_APPS:INSTALLED_APPS = [ ... 'django_usermanagement', ]
-
Include URLconf in
urls.py:from django.urls import path, include urlpatterns = [ ... path('user/', include('django_usermanagement.urls')), ]
-
Run migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Start the server:
python manage.py runserver
-
Access the app:
- Admin panel: http://127.0.0.1:8000/admin/
- User management: 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:
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:
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 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.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_usermanagement_interface-1.4.3.tar.gz.
File metadata
- Download URL: django_usermanagement_interface-1.4.3.tar.gz
- Upload date:
- Size: 233.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d6a92241747a5c06e4a789dc6bcd12209cf41d8912dc83e9e3f6e483ab92c57
|
|
| MD5 |
98f0c0ffc36b9790563967ccac851d14
|
|
| BLAKE2b-256 |
a13b7b90d812d1a0ff3f950003361136a358697c1759069c497411cc9d34e1c2
|
File details
Details for the file django_usermanagement_interface-1.4.3-py3-none-any.whl.
File metadata
- Download URL: django_usermanagement_interface-1.4.3-py3-none-any.whl
- Upload date:
- Size: 239.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3059a4fd20923e71180787d240bd649e82e0b8ecd16882b63458c4c7536f41d6
|
|
| MD5 |
bf4381602d170dd13a5f2c8088bde971
|
|
| BLAKE2b-256 |
bb673c7b68c91f5c2c9e8769c31247f2d0f9b63ee47c60968ae2e638e8cbe52e
|