This commit is contained in:
Flatlogic Bot 2026-01-23 10:15:18 +00:00
parent d8246c69a2
commit 60816d1fde
5 changed files with 4 additions and 1 deletions

View File

@ -183,6 +183,9 @@ if EMAIL_USE_SSL:
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
LOGIN_REDIRECT_URL = 'dashboard'
LOGOUT_REDIRECT_URL = 'home'
from django.utils.translation import gettext_lazy as _
LANGUAGES = [

View File

@ -36,7 +36,7 @@ def register(request):
@login_required
def dashboard(request):
profile = request.user.profile
profile, created = Profile.objects.get_or_create(user=request.user)
if profile.role == 'SHIPPER':
my_shipments = Shipment.objects.filter(shipper=request.user).order_by('-created_at')
return render(request, 'core/shipper_dashboard.html', {'shipments': my_shipments})

BIN
media/trucks/lorry2.jfif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB