diff --git a/cookbook/templates/no_space_info.html b/cookbook/templates/no_space_info.html index 5267687e5..980ce68cf 100644 --- a/cookbook/templates/no_space_info.html +++ b/cookbook/templates/no_space_info.html @@ -32,7 +32,7 @@
{% trans 'Join an existing space.' %}
-

{% trans 'To join an existing space either enter your invite token or click on the invite link the space owner send you.' %}

+

{% trans 'To join an existing space either enter your invite token or click on the invite link the space owner send you.' %}

{% csrf_token %} @@ -49,7 +49,7 @@
{% trans 'Create your own recipe space.' %}
-

{% trans 'Start your own recipe space and invite other users to it.' %}

+

{% trans 'Start your own recipe space and invite other users to it.' %}

{% csrf_token %} {{ create_form | crispy }} diff --git a/cookbook/views/views.py b/cookbook/views/views.py index fc68ab8f5..d56222bf8 100644 --- a/cookbook/views/views.py +++ b/cookbook/views/views.py @@ -120,6 +120,7 @@ def no_space(request): max_users=settings.SPACE_DEFAULT_MAX_USERS, allow_sharing=settings.SPACE_DEFAULT_ALLOW_SHARING, ) + request.user.userpreference.space = created_space request.user.userpreference.save() request.user.groups.add(Group.objects.filter(name='admin').get()) @@ -139,7 +140,7 @@ def no_space(request): if 'signup_token' in request.session: return HttpResponseRedirect(reverse('view_invite', args=[request.session.pop('signup_token', '')])) - create_form = SpaceCreateForm() + create_form = SpaceCreateForm(initial={'name': f'{request.user.username}\'s Space'}) join_form = SpaceJoinForm() return render(request, 'no_space_info.html', {'create_form': create_form, 'join_form': join_form})