I created a new model inside xblock-sdk/models.py file called scenarios
with multiple fields and then serialized them so i can access them using
django rest framwork,
#models.py
class Scenarios(models.Model):
description = models.TextField()
XBlock_id = models.CharField(max_length=100)
def __repr__(self):
return u"<description={self.scenario} " \
"XBlock_id={self.scenario_id}>".format(self=self)
#serializer.py
class xblockSerializer(serializers.ModelSerializer):
class Meta:
model = Scenarios
fields = '__all__'
the purpose is to get all the data about the available xblocks. however
when i access the url in django rest framework i find an empty response
which seems to be logic because i only created a model and i didn't
populate it with the available xblocks data.
my question is what should i do in order to get a response with the data
about the xblocks.
--
You received this message because you are subscribed to the Google Groups
"General Open edX discussion" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/edx-code/ffe7ab4a-e1e7-4154-921a-247b077fc119%40googlegroups.com.