SHARE
TWEET

Untitled

a guest Mar 18th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #settings.py
  2.  
  3. INSTALLED_APPS = [
  4. 'django.contrib.admin',
  5. 'django.contrib.auth',
  6. 'django.contrib.contenttypes',
  7. 'django.contrib.sessions',
  8. 'django.contrib.messages',
  9. 'django.contrib.staticfiles',
  10. 'rest_framework',
  11. 'api',
  12. ]
  13.  
  14. #serializers.py
  15.  
  16. from rest_framework import serializers #<---- this line is giving me error
  17. from .models import Plans  
  18.     class PlansSerializer(serializers.ModelSerializer):
  19.     """Serializer to map the Model instance into JSON format."""
  20. class Meta:
  21.     """Meta class to map serializer's fields with the model fields."""
  22.     model = Plans
  23.     fields = ('id', 'name', 'date_created', 'date_modified')
  24.     read_only_fields = ('date_created', 'date_modified')
  25.      
  26. certifi==2018.11.29
  27. Django==2.1.7
  28. django-crispy-forms==1.7.2
  29. django-filter==2.1.0
  30. django-markdown==0.8.4
  31. django-markdown2==0.3.1
  32. django-pagedown==1.0.6
  33. djangorestframework==3.9.2
  34. djangorestframework-simplejwt==4.1.0
  35. Markdown==3.0.1
  36. markdown2==2.3.7
  37. olefile==0.46
  38. Pillow==5.4.1
  39. Pygments==2.3.1
  40. PyJWT==1.7.1
  41. pytz==2018.9
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top