Merge branch 'fix_userpreferences' into 'master'

Fix userpreferences

See merge request oliver/ivatar!32
This commit is contained in:
Oliver Falk
2018-07-09 12:48:25 +02:00
2 changed files with 5 additions and 1 deletions

View File

@@ -57,6 +57,8 @@ class CreateView(SuccessMessageMixin, FormView):
password=form.cleaned_data['password1'])
if user is not None:
login(self.request, user)
pref = UserPreference.objects.create(user_id=user.pk)
pref.save()
return HttpResponseRedirect(reverse_lazy('profile'))
else:
return HttpResponseRedirect(

View File

@@ -2,11 +2,13 @@
{% load static %}
{% load bootstrap4 %}
{% load i18n %}<!DOCTYPE HTML>
{% spaceless %}{% block bootstrap4_content %}
{% block bootstrap4_extra_head %}
{% include 'header.html' %}
<title>iVatar :: {% block title %}{% trans 'Freeing the Web, one face at a time!' %}{% endblock title %}</title>
{% endblock bootstrap4_extra_head %}
{% spaceless %}{% block bootstrap4_content %}
<div id="header">
{% block topbar_base %}
<nav class="navbar navbar-expand-lg navbar-light bg-light">