title: AssertionError: Class RegisterSerializer missing "Meta" attribute
body: <p>I am getting this error &quot;AssertionError: Class RegisterSerializer missing &quot;Meta&quot; attribute&quot; when using Django Rest API. I did make all migrations but can't figure out how to fix this error. The /register part of this application is where I am getting the error.</p>
  <p>serializers.py</p>
  <pre><code>from rest_framework import serializers
  from rest_framework.validators import UniqueValidator
  from rest_framework_jwt.serializers import User
  
  from .models import Movie
  
  
  class MovieSerializer(serializers.ModelSerializer):
      class Meta:
          model = Movie
          fields = ('pk', 'name', 'description', 'year', 'rating')
  
  
  class RegisterSerializer(serializers.ModelSerializer):
      email = serializers.EmailField(
          required=True,
          validators=[UniqueValidator(queryset=User.objects.all())]
      )
  
  
  password = serializers.CharField(write_only=True, required=True, style={'input_type': 'password'},
                                   validators=[validate_password])
  password2 = serializers.CharField(write_only=True, style={'input_type': 'password'}, required=True)
  
  
  class Meta:
      model = User
      fields = ('username', 'password', 'password2', 'email', 'first_name', 'last_name')
      extra_kwargs = {
          'first_name': {'required': True},
          'last_name': {'required': True}
      }
  
  
  def validate(self, attrs):
      if attrs['password'] != attrs['password2']:
          raise serializers.ValidationError({&quot;password&quot;: &quot;Password fields didn't match.&quot;})
  
      return attrs
  
  
  def create(self, validated_data):
      user = User.objects.create(
          username=validated_data['username'],
          email=validated_data['email'],
          first_name=validated_data['first_name'],
          last_name=validated_data['last_name'])
  
      user.set_password(validated_data['password'])
      user.save()
  
      return user
  </code></pre>
  <p>urls.py</p>
  <pre><code>from django.contrib import admin
  from django.urls import path
  
  from django.conf.urls import url
  from rest_framework_jwt.views import obtain_jwt_token
  from api import views
  from api.views import RegisterView
  
  urlpatterns = [
  
      path('admin/', admin.site.urls),
      path('auth/', obtain_jwt_token),
      path('', views.movie_list),
      url(r'^api/movies/$', views.movie_list),
      url(r'^api/movies/(?P&lt;pk&gt;[0-9]+)$', views.getMovie),
      path('register/', RegisterView.as_view(), name='auth_register'),
  ]
  </code></pre>
  <p>models.py</p>
  <pre><code>from django.db import models
  from django.utils import timezone
  
  
  # Create your models here.
  class Movie(models.Model):
      name = models.CharField(max_length=50)
      description = models.TextField(max_length=360)
      year = models.IntegerField(blank=False, null=False)
      rating = models.IntegerField(blank=False, null=False)
  
      created_date = models.DateTimeField(
          default=timezone.now)
      updated_date = models.DateTimeField(auto_now_add=True)
  
      def created(self):
          self.created_date = timezone.now()
          self.save()
  
      def updated(self):
          self.updated_date = timezone.now()
          self.save()
  </code></pre>
  <p>views.py</p>
  <pre><code>from rest_framework import status, generics
  from rest_framework.decorators import api_view
  from django.views.decorators.csrf import csrf_exempt
  from .serializers import *
  from rest_framework.response import Response
  from rest_framework.permissions import IsAuthenticated, IsAuthenticatedOrReadOnly, AllowAny
  
  
  @csrf_exempt
  @api_view(['GET', 'POST'])
  def movie_list(request):
      permission_classes = IsAuthenticatedOrReadOnly
      if request.method == 'GET':
          movies = Movie.objects.all()
          serializer = MovieSerializer(movies, context={'request': request}, many=True)
          return Response({'data': serializer.data})
  
      elif request.method == 'POST':
          serializer = MovieSerializer(data=request.data)
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data, status=status.HTTP_201_CREATED)
          return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  
  
  @api_view(['GET', 'PUT', 'DELETE'])
  def getMovie(request, pk):
      &quot;&quot;&quot;
      Retrieve, update or delete a movie instance.
      &quot;&quot;&quot;
      try:
          movie = Movie.objects.get(pk=pk)
      except Movie.DoesNotExist:
          return Response(status=status.HTTP_404_NOT_FOUND)
  
      if request.method == 'GET':
          serializer = MovieSerializer(movie, context={'request': request})
          return Response(serializer.data)
  
      elif request.method == 'PUT':
          serializer = MovieSerializer(movie, data=request.data, context={'request': request})
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data)
          return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  
      elif request.method == 'DELETE':
          movie.delete()
          return Response(status=status.HTTP_204_NO_CONTENT)
  
  
  class RegisterView(generics.CreateAPIView):
      queryset = User.objects.all()
      permission_classes = (AllowAny,)
      serializer_class = RegisterSerializer
  </code></pre>
  <p>I have tried some suggestions from other posts on here but all of those did not apply to my current issue. Thanks for any help.</p>