summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Leray <alexandre@alexandreleray.com>2010-11-04 10:37:48 (GMT)
committer Alexandre Leray <alexandre@alexandreleray.com>2010-11-04 10:37:48 (GMT)
commitc336da58018cc914dcca2cc4a81354c0e6d86125 (patch)
treec7a2475d439d1f386750ac850316e35e42b2dc57
parentfc4e0ca08505483f72cb962343d9969e34f9ae34 (diff)
put user action for pull action"
-rwxr-xr-xbrainch/models/actions.py6
-rwxr-xr-xbrainch/views/repositories/pull.py3
2 files changed, 6 insertions, 3 deletions
diff --git a/brainch/models/actions.py b/brainch/models/actions.py
index 1ad4d8b..2108484 100755
--- a/brainch/models/actions.py
+++ b/brainch/models/actions.py
@@ -71,6 +71,12 @@ class UserAction(models.Model):
% data.get("repo_name", "???")
message += "from %s" \
% data.get("origin_user", "???")
+ elif self.get_what_display() == "PULLED":
+ message += "<span class=\"pulled\">&#9903; synchronized</span> "
+ message += "his/her text <em>%s</em> " \
+ % data.get("repo_name", "???")
+ message += "with %s's" \
+ % data.get("origin_user", "???")
elif self.get_what_display() == "INVITED":
message += "<span class=\"invited\">invited</span> "
message += "%s " \
diff --git a/brainch/views/repositories/pull.py b/brainch/views/repositories/pull.py
index 94820c1..e5de2eb 100755
--- a/brainch/views/repositories/pull.py
+++ b/brainch/views/repositories/pull.py
@@ -68,11 +68,8 @@ def pull(request, username, name):
what=UserAction.get_action_index("PULLED"),
when=datetime.now(),
data=json.dumps({
- "origin_name": origin.name,
- "origin_slug": origin.slug,
"origin_user": origin.user.username,
"repo_name": destination.name,
- "repo_slug": destination.slug,
}),
)
action.save()