django-usermanagement-interface 1.4.3

Creator: danarutscher

Last updated:

Add to Cart

Description:

djangousermanagementinterface 1.4.3

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-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


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.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.