i want to test debug in one of my .py files when i apply pdb the tutor enters into pdb but i am unable to interact with it like whatever i type it doen’t have any effect
Hey,
Can you describe the steps you tried?
And also what version of tutor are you using?
I can’t help you if you don’t give me a bit more context describe the steps you took
- What series of commands did your run?
- What service are you trying to run with pdb?
- Where is your custom code? In the requirements folder? Did you mount a different volume?
- What version of Tutor are you using?
- What have you tried to debug/fix?
And please, copy-paste logs instead of using screenshots. It helps other search for it error messages in the future.
class DisplayCoursesListAPI(viewsets.ModelViewSet):
"""
These class returns the Course List data that needs to be displayed in Full calendar js
Here, only necessary data is returned and in formatted manner that is understanded by Full calendar js
api_url: http://localhost:18000/hands-on-practical/api/events-data/
"""
def list(self, request, *args, **kwargs):
"""
To return the Course list which is to be displayed in full calendar
"""
try:
all_data = FormFillingDate.objects.all()
import pdb;pdb.set_trace()
except:
log.error("No Data retrieved")
all_practical_list = []
for i in all_data:
practical_list = {}
practical_list['title'] = i.practical_name
practical_list['start'] = datetime.datetime.strptime(str(i.start_date.date()), "%Y-%m-%d").strftime("%Y-%m-%d")
practical_list['end'] = datetime.datetime.strptime(str(i.end_date.date()), "%Y-%m-%d").strftime("%Y-%m-%d")
all_practical_list.append(practical_list)
return response.Response(all_practical_list)
-
basically i am integrating full calendar js and this function returns data for it
It -
version is latest and i am using override.docker-compose.yml
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.