Skip to content
Advertisement

Tag: django

Django no reverse match at

I have a problem with my code I’m trying to create an edit button to modify the employees subsequently displayed and make the changes but I can’t display with dynamic url in django. views.py url.py employe.html models.py screenShot of the page Answer The problem is here: You don’t have employe in the context. You need to change it to: And

Joining two table and get data from both table based on certain column in django

At first i want to make understand you to be not overactive or over-reactive without giving any solution and not understanding the core content and topics of questions.Here many people available who are expert at overacting and over-reacting by giving minus vote knowing anything.If you do not like this question then ignore it because your minus vote prevent many important

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_list =

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][2] [2]: https://github.com/namra004/ITBooK [GitHub – Back-End][3] [3]:https://github.com/namra004/ITBookBackEnd Answer I

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 getting the info from orderstext

Django/Wagtail Snippet Serializer in API

I have added wagtail CMS’s blog author in my ‘models.py’ also exposed it in API, but it’s showing like this in API Here’s the models.py code How do I serialize like this show author name, website, image and id? I tried to Serialize the BlogAuthor And here is the API field APIField(“blog_authors”, serializer=AuthorSerializer(many=True)), When I runserver I got this error

Advertisement