Fixed participant edit view
This commit is contained in:
parent
5040de8dcb
commit
1ebca3b12e
@ -66,7 +66,7 @@ class User(SlideMixin, PersonMixin, Person, DjangoUser):
|
|||||||
"""
|
"""
|
||||||
if link == 'detail' or link == 'view':
|
if link == 'detail' or link == 'view':
|
||||||
return reverse('user_view', args=[str(self.id)])
|
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)])
|
return reverse('user_edit', args=[str(self.id)])
|
||||||
if link == 'delete':
|
if link == 'delete':
|
||||||
return reverse('user_delete', args=[str(self.id)])
|
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(get_person('user:2'), self.user1)
|
||||||
self.assertEqual(len(Persons(person_prefix_filter='user')), 2)
|
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):
|
class GroupTest(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user