class dbview(models.Model): # field definitions omitted for brevity class Meta: db_table = \'read_only_view\' def main(request): result = dbview
If there really is no primary key in the view, then there is no workaround.
Django requires each model to have exactly one field primary_key=True.