Django get data from database
<p>I need a function:</p>

<pre><code>def GetData(self, column):
   query = UserData.objects.get(Username="Stack")
   return query.column
</code></pre>

<p>And use this:</p>

<pre><code>ClassName.GetData(request, 'Email')
</code></pre>

<p>Unfortunately, of course, it will not work. How do I make it work the expected way?</p>