title: Querying from sql with dynamic model name and fields in Django
body: <p>I'm new in Django and struggling with some dynamic solutions. I am trying to make an application that user can create table from UI and import data into this table from flat file and then user can be able to browse that data by clicking url(for example, if user create a table for employee, then user should be able to have a url like this for employee : localhost/employee). I will work on import part later but for now, i am trying to find a solution to browse data. And below query is almost do this. But i am not able to use alias instead of column names. Is there any way to build something like that dynamic?</p>
  
  <pre><code>def employee(request):
      entries = Employee.objects.annotate(First Name=F('FirstName')). only('FirstName','Email')
      print(entries)
      return render_to_response('employee.html',{'employees': serializers.serialize("json",entries, fields=('First Name','Email'))}) 
  </code></pre>
  
  <p>Above query give me below result. I have only email information here. So there is no First Name because annotate is not working.</p>
  
  <pre><code>[{"model": "client.employee", "pk": 1, "fields": {"Email":"employe1@gmail.com"}}]
  </code></pre>