Commit f9eb0109 authored by Daniel W Bond's avatar Daniel W Bond

created serializer for listing based on fields available through non-logged-in...

created serializer for listing based on fields available through non-logged-in listing page, and installed drf app to settings file
parent a542acd9
# standard library imports
from __future__ import absolute_import, print_function, unicode_literals
# third party imports
from rest_framework import serializers
# imports from your apps
from trades.models import Listing
class ListingSerializer(serializers.ModelSerializer):
class Meta:
model = Listing
fields = ('title', 'author', 'isbn', 'year', 'edition',
'condition', 'access_code', 'course_abbr', 'description',
'price', 'photo', 'exchanged', 'cancelled', 'exchanged')
......@@ -73,6 +73,7 @@ INSTALLED_APPS = (
'haystack',
'piwik',
'randomslugfield',
'rest_framework',
'storages',
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment