Skip to content

Tag: django

crontab django Erorr

I’m trying to start simple crontab-django job scheduled (os is Ubuntu 20.04): this is the myapp/cron.py file as mentioned in the documentation cron.py and this is the settings i used frm the documentation i keep getting this error even i tried to add python manage.py crontab add again and show and it ap…

Django Traverse Foreign Keys

I have 3 models and I am trying to create a dashboard with a list of Trials that spans all Client Sessions for a specific client chosen via a filter. Here are the models: Here is the view that im trying to create Answer You have an error filter query you used Filter data. Expected is queryset. Change, trial_l…

Django inject data after base.html

I have a base.html file which is a side bar menu. like this: I also have a text file that I want to show the content. So I configured my view like this: The destination HTML file which is going to show the data is like this: The problem is, the text file data is now showing up. and if

How to manage CORS in Django

Im trying to connect React.js[axios] and Django [hosting in Heroku] and every time I get this. On my localhosts everything works fine I get all the object except images, but all works fine. Ive allowed my host to connect but it doesn’t work and here is react.js connection part [GitHub – Front-End]…

Load data from model in view.py Django

I just started with Django and Python and I still don’t understand it very well. Would it be possible to access all the information stored in Persons, showing also orderstext and archivename, I can’t manage to do it :( my idea is to get all the information and save it as JSON, but I’m not ge…