title: Django: AttributeError: type object 'GroupModel' has no attribute '_meta'
body: <p>I am new in Django, in my code when I requested from postman I got this error, may someone help me what's wrong in my code?</p>
  
  <p>model:</p>
  
  <pre><code>from django.db import models
  
  class GroupModel(object):
      title=models.CharField(max_length=20)
      description = models.CharField()
  
      class Meta:
          db_table = 'group'
      def __str__(self):
          return self
  </code></pre>
  
  <hr>
  
  <p>serializer:</p>
  
  <pre><code>from rest_framework import serializers
  from .models import GroupModel
  
  class GroupSerializer(serializers.ModelSerializer):
      print('hello4')
      class Meta:
          model = GroupModel
          fields = '__all__'
  </code></pre>
  
  <hr>
  
  <p>views:</p>
  
  <pre><code>from django.shortcuts import render
  from django.http import HttpResponse, JsonResponse
  from .serializer import GroupSerializer
  from .models import GroupModel
  from rest_framework.decorators import api_view
  from rest_framework import status
  @api_view(['POST'])
  def InsetGroup(request):
       data = GroupSerializer(data = request.data)
  
       if request.method == 'POST':
           if data.is_valid():
               data.save()
               return JsonResponse('saved was saccessfull', safe = False)
           return JsonResponse(data.errors, status = status.HTTP_400_BAD_REQUEST, safe = False)
  </code></pre>