aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-10-13 22:43:28 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-10-13 22:43:28 +0300
commit5d5415d29daa990d27913da638a6e2bc30afb4e8 (patch)
tree6209d223da8094f65f7f73fde1376c0b189fd5be
parent8045bf7033aff5c66069424844b5fc6585ab06cd (diff)
downloadServo-5d5415d29daa990d27913da638a6e2bc30afb4e8.tar.gz
Servo-5d5415d29daa990d27913da638a6e2bc30afb4e8.tar.bz2
Servo-5d5415d29daa990d27913da638a6e2bc30afb4e8.zip
Cleanup
-rwxr-xr-xinstall.py3
-rwxr-xr-xservo/templates/accounts/settings.html1
-rw-r--r--servo/templates/checkin/index.html2
-rw-r--r--servo/templates/checkin/newindex.html6
-rw-r--r--servo/views/checkin.py8
-rw-r--r--settings.py2
6 files changed, 12 insertions, 10 deletions
diff --git a/install.py b/install.py
index e2c5306..60170c0 100755
--- a/install.py
+++ b/install.py
@@ -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',