diff --git a/musician/forms.py b/musician/forms.py index 5fcafbe..7a66a00 100644 --- a/musician/forms.py +++ b/musician/forms.py @@ -17,5 +17,6 @@ class LoginForm(AuthenticationForm): else: self.username = username self.token = orchestra.auth_token + self.user = orchestra.retrieve_profile() return self.cleaned_data diff --git a/musician/models.py b/musician/models.py index a0c058f..a9b9698 100644 --- a/musician/models.py +++ b/musician/models.py @@ -109,14 +109,20 @@ class UserAccount(OrchestraModel): @classmethod def new_from_json(cls, data, **kwargs): billing = None + language = None last_login = None if 'billcontact' in data: billing = BillingContact.new_from_json(data['billcontact']) + # Django expects that language code is lowercase + if 'language' in data: + language = data['language'].lower() + if 'last_login' in data: last_login = parse_datetime(data['last_login']) - return super().new_from_json(data=data, billing=billing, last_login=last_login) + + return super().new_from_json(data=data, billing=billing, language=language, last_login=last_login) class DatabaseUser(OrchestraModel): diff --git a/musician/static/musician/css/default.css b/musician/static/musician/css/default.css index a95a573..3fbe7da 100644 --- a/musician/static/musician/css/default.css +++ b/musician/static/musician/css/default.css @@ -43,6 +43,9 @@ a:hover { min-width: 280px; max-width: 280px; min-height: 100vh; + + position: fixed; + z-index: 999; display: flex; flex-direction: column; @@ -127,6 +130,7 @@ a:hover { background-position: right 5% top 10%; color: #343434; padding-left: 2rem; + margin-left: 280px; /** sidebar width **/ } /** services **/ diff --git a/musician/templates/musician/billing.html b/musician/templates/musician/billing.html index 46d1396..f181341 100644 --- a/musician/templates/musician/billing.html +++ b/musician/templates/musician/billing.html @@ -4,7 +4,7 @@ {% block content %}
Little description of what to be expected...
+{% trans "Little description of what billing section is." %}
Number | -Bill date | -Type | -Total | -Download PDF | +{% trans "Number" %} | +{% trans "Bill date" %} | +{% trans "Type" %} | +{% trans "Total" %} | +{% trans "Download PDF" %} |
---|