diff options
-rwxr-xr-x | install.py | 3 | ||||
-rwxr-xr-x | servo/templates/accounts/settings.html | 1 | ||||
-rw-r--r-- | servo/templates/checkin/index.html | 2 | ||||
-rw-r--r-- | servo/templates/checkin/newindex.html | 6 | ||||
-rw-r--r-- | servo/views/checkin.py | 8 | ||||
-rw-r--r-- | settings.py | 2 |
6 files changed, 12 insertions, 10 deletions
@@ -55,7 +55,8 @@ loc['address'] = raw_input('4/6 Address [Somestreet 1]: ') or 'Somestreet 1' loc['zip_code'] = raw_input('5/6 Postal code [1234]: ') or '1234' loc['city'] = raw_input('6/6 City [Stockholm]: ') or 'Stockholm' -from servo.models import Location, User +from servo.models.common import Location +from servo.models.account import User first_loc = Location(**loc) first_loc.save() diff --git a/servo/templates/accounts/settings.html b/servo/templates/accounts/settings.html index a48ab19..ab32b39 100755 --- a/servo/templates/accounts/settings.html +++ b/servo/templates/accounts/settings.html @@ -33,7 +33,6 @@ <div class="tab-pane" id="tab4"> {% include "form_field_snippet.html" with field=form.tech_id %} {% include "form_field_snippet.html" with field=form.gsx_userid %} - {% include "form_field_snippet.html" with field=form.gsx_password %} {% include "form_field_snippet.html" with field=form.gsx_poprefix %} </div> </div> diff --git a/servo/templates/checkin/index.html b/servo/templates/checkin/index.html index 9ecc884..2995be5 100644 --- a/servo/templates/checkin/index.html +++ b/servo/templates/checkin/index.html @@ -40,6 +40,8 @@ <ul class="dropdown-menu"> {% for u in request.session.checkin_users %} <li{% if u.pk == request.session.checkin_user %} class="active"{% endif %}><a href="?u={{ u.pk|safe }}">{{ u.name }}</a></li> + {% empty %} + <li class="disabled"><a href="#">{% trans "No users found" %}</a></li> {% endfor %} <li class="divider"></li> <li><a href="{% url 'accounts-list_orders' user.username %}">{% bootstrap_icon "log-in" %} {% trans "Go to Servo" %}</a></li> diff --git a/servo/templates/checkin/newindex.html b/servo/templates/checkin/newindex.html index 41a6a05..7c04fb8 100644 --- a/servo/templates/checkin/newindex.html +++ b/servo/templates/checkin/newindex.html @@ -87,9 +87,9 @@ <input type="checkbox" name="tags" value="{{ t.id|safe }}"/> {% bootstrap_icon "tag" %} {{ t.title }} </label> </div> - {% endfor %} - </div> - </div> + {% endfor %} + </div> + </div> </div> </div> {% endif %} diff --git a/servo/views/checkin.py b/servo/views/checkin.py index 323da3e..16d852c 100644 --- a/servo/views/checkin.py +++ b/servo/views/checkin.py @@ -19,11 +19,11 @@ from servo.lib.utils import json_response from servo.views.order import put_on_paper from servo.validators import apple_sn_validator from servo.models import (User, Device, GsxAccount, Order, - Customer, Location, Note, Attachment, - Configuration, ChecklistItem, Tag,) + Customer, Location, Note, Attachment, + Configuration, ChecklistItem, Tag,) from servo.forms import (SerialNumberForm, AppleSerialNumberForm, - DeviceForm, IssueForm, CustomerForm, - QuestionForm, AttachmentForm, StatusCheckForm,) + DeviceForm, IssueForm, CustomerForm, + QuestionForm, AttachmentForm, StatusCheckForm,) def init_locale(request): diff --git a/settings.py b/settings.py index 0dbc590..2ba8dd8 100644 --- a/settings.py +++ b/settings.py @@ -86,9 +86,9 @@ TEMPLATE_LOADERS = ( MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', - 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'servo.lib.middleware.LoginRequiredMiddleware', |