Merge pull request #1003 from ostcar/participant_update
Fixed participant edit view
This commit is contained in:
commit
2f04462947
@ -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)])
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user