def model_view(self, request, model_databrowse, url):
        self.model, self.site = model_databrowse.model, model_databrowse.site
        self.fields = self.field_dict(self.model)

        # If the model has no fields with choices, there's no point in going
        # further.
        if not self.fields:
            raise http.Http404('The requested model has no fields.')

        if url is None:
            return self.homepage_view(request)
        url_bits = url.split('/', 1)
        if url_bits[0] in self.fields:
            return self.field_view(
                request,
                self.fields[url_bits[0]],
                *url_bits[1:]
            )

        raise http.Http404('The requested page does not exist.')
dataset/ETHPy150Open Alir3z4/django-databrowse/django_databrowse/plugins/fieldchoices.py/FieldChoicePlugin.model_view/original