aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2013-06-27 18:50:39 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2013-06-27 18:50:39 +0300
commit5f5494c9326e37e1a5c647bbfeba5d3e8d09c084 (patch)
tree215d668a1ecb0c9a697c1810d874ca585d1f76bd
parent3077f76745636aa8da1e175fa206fff08b0499ee (diff)
Strip "@linaro.org" from username when creating job prefix.
-rw-r--r--android_build/frontend/views.py1
-rw-r--r--android_build/templates/new.html2
2 files changed, 2 insertions, 1 deletions
diff --git a/android_build/frontend/views.py b/android_build/frontend/views.py
index 63a6554..271783c 100644
--- a/android_build/frontend/views.py
+++ b/android_build/frontend/views.py
@@ -104,6 +104,7 @@ def new(request):
return HttpResponse("sorry you are not allowed here", status=403)
data = {
'request': request,
+ 'user': request.user.username.split("@", 1)[0],
'groups': request.user.groups.all(),
}
return _render(request, 'new.html', data)
diff --git a/android_build/templates/new.html b/android_build/templates/new.html
index 732495e..a365778 100644
--- a/android_build/templates/new.html
+++ b/android_build/templates/new.html
@@ -11,7 +11,7 @@
{% for g in groups %}
<option value="{{g.name}}">
{% if g.name == "linaro-android-builders" %}
- {{request.user.username}}
+ {{user}}
{% else %}
{% if g.name == "linaro-android-official-builders" %}
linaro-android