Skip to content
Advertisement

Tag: django

(django) Showing posts according to interests of users

I am pretty new to Django and still learning it, but I have to create something like medium.com. I want to show posts to users according to their interests. I added an interests field with a checkbox in a sign-up form. And of course, I added a category to the Post model. So, how can I show (to logged-in users

How can i pass a dynamic url to another url

Im new to Django. So, my problem is that i want my dynamic url like this: “2332” is the dynamic part to pass to this: urls.py: html file: the Problem is at the “link”. How can i pass the stuff that is in the url to the new url Answer Your view should pass it to the context when you

Django React Serving Together Page not found (404)

I develop an application using Django and React. I want to serving Django and React together. I create an build in react. I use it in Django. This is urls.py ; and views.py; When I run development server there is no any error but when ı want to go url directly ; http://www.x.com:8000/accounts I got page not found (404) error.

Update Query list in Django

I’m having a trouble on how can I automatically update my amount_unpaid when the time I updated my amount_paidcolumn. The result of amount_unpaid should be subtract my amount – amount_paid = amount_unpaid . The way I updated my data is using list like the code below, please check this out, Any help is much appreciated Thanks in advance. AttributeError: ‘QuerySet’

Advertisement