Merge pull request #1003 from ostcar/participant_update

Fixed participant edit view
This commit is contained in:
Oskar Hahn 2013-11-06 12:34:09 -08:00
commit 2f04462947
2 changed files with 8 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class User(SlideMixin, PersonMixin, Person, DjangoUser):
"""
if link == 'detail' or link == 'view':
return reverse('user_view', args=[str(self.id)])
if link == 'edit':
if link == 'edit' or link == 'update':
return reverse('user_edit', args=[str(self.id)])
if link == 'delete':
return reverse('user_delete', args=[str(self.id)])

View File

@ -43,6 +43,13 @@ class UserTest(TestCase):
self.assertEqual(get_person('user:2'), self.user1)
self.assertEqual(len(Persons(person_prefix_filter='user')), 2)
def test_get_absolute_url(self):
urls = (('detail', '/participant/2/'),
('update', '/participant/2/edit/'),
('delete', '/participant/2/del/'))
for link, url in urls:
self.assertEqual(self.user1.get_absolute_url(link), url)
class GroupTest(TestCase):
def setUp(self):