mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-09-28 04:34:53 +02:00
added conditions if projects exists, then redirect to dashboard else onboard
This commit is contained in:
@@ -312,4 +312,9 @@ def delete_project(request, id):
|
||||
|
||||
def onboarding(request):
|
||||
context = {}
|
||||
# check is any projects exists, then redirect to project list else onboarding
|
||||
projects = Project.objects.all()
|
||||
if len(projects):
|
||||
slug = projects[0].slug
|
||||
return HttpResponseRedirect(reverse('dashboardIndex', kwargs={'slug': slug}))
|
||||
return render(request, 'dashboard/onboarding.html', context)
|
||||
|
||||
Reference in New Issue
Block a user