0

I am very new with Django and trying to learn from various sources on internet. My project folder structure goes like enter image description here

I am using sqlite.db and made 6 models that are linked to backend DB. One of the table i have is Execution_Results.

class Execution_Results(models.Model):
    class Meta:
        permissions = (
            ('view_results', 'User can view results'),
        )
        verbose_name_plural = "Execution_Results"
    config_id = models.ForeignKey(Config_Details, on_delete=models.CASCADE)
    exec_time = models.DateTimeField()
    path = models.CharField(max_length=100)

With Admin login i can only provide access to add, edit and delete for that particular or group of users. For my case i just want view access for users. And based on whatever config_id they choose i want to read data from other tables based on mapping and present it for user.

I gave permissions = ( ('view_results', 'User can view results'), ) but i am not getting what next shall be done so that user can just view this table data.

Pawankumar Dubey
  • 387
  • 1
  • 6
  • 21

1 Answers1

0

I got this resolved without any setting or coding by just adding view permission module from git. Please refer answer at Permission to view, but not to change! - Django

Pawankumar Dubey
  • 387
  • 1
  • 6
  • 21