class ChatRoom(models.Model):
ChatRoomType = Choices('dialog',' group')
room_type = StatusField(choices_name='ChatRoomType')
users = models.ManyToManyField(settings.AUTH_USER_MODEL,blank=True)
def get_user(self, request):
resolved = resolve(request.path_info)
if resolved.kwargs:
return self.parent_model.objects.get(pk=resolved.kwargs['object_id'])
return None
Теперь имею представление куда копать дальше