demo4
This commit is contained in:
parent
d8246c69a2
commit
60816d1fde
Binary file not shown.
@ -183,6 +183,9 @@ if EMAIL_USE_SSL:
|
|||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
|
||||||
|
LOGIN_REDIRECT_URL = 'dashboard'
|
||||||
|
LOGOUT_REDIRECT_URL = 'home'
|
||||||
|
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
LANGUAGES = [
|
LANGUAGES = [
|
||||||
|
|||||||
Binary file not shown.
@ -36,7 +36,7 @@ def register(request):
|
|||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def dashboard(request):
|
def dashboard(request):
|
||||||
profile = request.user.profile
|
profile, created = Profile.objects.get_or_create(user=request.user)
|
||||||
if profile.role == 'SHIPPER':
|
if profile.role == 'SHIPPER':
|
||||||
my_shipments = Shipment.objects.filter(shipper=request.user).order_by('-created_at')
|
my_shipments = Shipment.objects.filter(shipper=request.user).order_by('-created_at')
|
||||||
return render(request, 'core/shipper_dashboard.html', {'shipments': my_shipments})
|
return render(request, 'core/shipper_dashboard.html', {'shipments': my_shipments})
|
||||||
|
|||||||
BIN
media/trucks/lorry2.jfif
Normal file
BIN
media/trucks/lorry2.jfif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
Loading…
x
Reference in New Issue
Block a user