Small fixes

This commit is contained in:
nikolark committed 2014-02-05 19:37:20 +01:00
1 parent 52629901e7
commit d02d22f52d
3 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -2,4 +2,4 @@ def format_username(firstname, lastname):
first = firstname.lower().strip().replace(" ", "")[:6].encode('ascii', 'ignore')
last = lastname.lower().strip().replace(" ", "")[:6].encode('ascii', 'ignore')
return "{}{}".format(first, last)
return "{0}{0}".format(first, last)
+1 -1
View File
@@ -41,7 +41,7 @@
<div class="row">
<div class="col-md-12">
<ul class="well">
{% for user in users %}<li class="customer{% if user.get_profile.last_purchase_date < half_a_year_ago %} infrequent hidden{% endif %}">{% spaceless %}
{% for user in users %}<li class="customer{% if user.get_profile.last_purchase_date < half_a_year_ago and not user.get_profile.last_purchase == None %} infrequent hidden{% endif %}">{% spaceless %}
{% if user.get_profile.image %}
  <img class="profile" src="{{ user.get_profile.image }}" alt="Profile picture" /><br />
{% else %}
+5 -5
View File
@@ -19,19 +19,19 @@
<section class="row">
<div class="col-md-5">
<h1>Legg til ny bruker</h1>
{% if form.errors %}
<p>{{ form.errors }}.</p>
{% if form.non_field_errors %}
<p>{{ form.non_field_errors}}.</p>
{% endif %}
<form method="post" role="form">
{% csrf_token %}
<div class="form-group">
<label for="id_first_name">{{ form.first_name.label }}</label>{{ form.first_name|add_class:"form-control"}}{{ form.first_name.error }}
<label for="id_last_name">{{ form.last_name.label }}</label>{{ form.last_name|add_class:"form-control"}}{{ form.last_name.error }}
<label for="id_first_name">{{ form.first_name.label }}</label>{{ form.first_name|add_class:"form-control"}}{{ form.first_name.errors }}
<label for="id_last_name">{{ form.last_name.label }}</label>{{ form.last_name|add_class:"form-control"}}{{ form.last_name.errors }}
</div>
<div class="form-group">
<label for="id_email">{{ form.email.label }}</label>{{ form.email|add_class:"form-control"}}{{ form.email.error }}
<label for="id_email">{{ form.email.label }}</label>{{ form.email|add_class:"form-control"}}{{ form.email.errors }}
</div>
<div class="form-group">
<label for="id_facebook_username">{{ form.facebook_username.label }}</label>