How do I retrieve a value of a field in a queryset object
<p>I'm new to django and have the following model:</p>

<pre><code>class MainFile(models.Model):
    owner = models.ForeignKey(User)
    # docfile = models.FileField(verbose_name= 'Enter you file', null=True)
    file_id = models.UUIDField(max_length=38, primary_key=True, default=1)
    file_name = models.CharField(max_length=70)
    file_suffix = models.CharField(max_length=5, blank=True, null=True)
    file_date = models.DateTimeField(auto_now_add=True, null=True)
</code></pre>

<p>So I want to filter a row of the table using file_id, and having that row, access the file_suffix. Currently I've found the following way but it's tricky:</p>

<pre><code>obj = MainFile.objects.filter(file_id = 'e3e978a3-0375-4bb9-85a2-5175e2ec097d')
suffix = [i.file_suffix for i in obj] 
</code></pre>

<p>I tried many ways but no luck except the above but I know that's not the correct way. How can I get the file_suffix after creating the obj using file_id as filter?</p>