Skip to content

Commit 5dccf15

Browse files
committed
Dashboard onboarding settings
1 parent 7b6061d commit 5dccf15

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

app/templates/app/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h3>{% trans 'Welcome!' %} ☺</h3>
2424
{% else %}
2525
{% include "quota.html" %}
2626

27-
{% if no_tasks %}
27+
{% if no_tasks and onboarding %}
2828
<h3>{% trans 'Welcome!' %} ☺</h3>
2929
{% trans 'Select Images and GCP' as upload_images %}
3030
<p>

app/views/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,13 @@ def dashboard(request):
4646
permissions.append('add_project')
4747

4848
# Create first project automatically
49-
if no_projects and 'add_project' in permissions:
49+
if settings.DASHBOARD_ONBOARDING and no_projects and 'add_project' in permissions:
5050
Project.objects.create(owner=request.user, name=_("First Project"))
5151

5252
return render(request, 'app/dashboard.html', {'title': _('Dashboard'),
5353
'no_processingnodes': no_processingnodes,
5454
'no_tasks': no_tasks,
55+
'onboarding': settings.DASHBOARD_ONBOARDING,
5556
'params': {
5657
'permissions': json.dumps(permissions)
5758
}.items()

webodm/settings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,10 @@
396396
# Link to task options docs
397397
TASK_OPTIONS_DOCS_LINK = "https://docs.opendronemap.org/arguments/"
398398

399+
# Whether to display onboarding instructions and
400+
# automatically create a first project on first login
401+
DASHBOARD_ONBOARDING = True
402+
399403
if TESTING or FLUSHING:
400404
CELERY_TASK_ALWAYS_EAGER = True
401405
EXTERNAL_AUTH_ENDPOINT = 'http://0.0.0.0:5555/auth'

0 commit comments

Comments
 (0)