Category "django"

The response content must be rendered before it can be iterated over. Django Rest Framework

I have a Cart model and Cartserializers. I am trying to do that is if cart defects exist in the cart and then update the cart by increasing the quantity of cart

How to get foreign key detailed values based on id in html template in django

In Models.py class Interview(models.Model): Current_Date = models.DateField(auto_now_add=True ) User = models.ForeignKey(User,

How to replace/extend Django shell with Rich?

Django allows to replace its default shell with more capable ones like ipython and bpython. Is there a way to replace/extend the default Django shell with Rich?

How allow to fit read_only field for new record in TabularInline class in Django

I want to have a field readonly when record already saved but if admin adds a new record field must to be editable. How I can achieve it?

How to force a page-break on weasyprint?

I wonder if its possible to create a force break that splits the table rows? I think weasyprint does this in a sense but I want to break the rows in to specific

Django - After Register, Data Should Go To 2 Different Tables (Customer & User)

I am creating an e-commerce website where people can choose to login or not but still the can order and checkout (even if you are an AnonymousUser or Guest user

django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable

This project was working fine until I used environ to make SECRET_KEY and DEBUG as environment variable using environ. After I am getting this error:- The outpu

How do I remove unused CSS when using Django, Sass and a frontend framework?

I am using a SCSS-based frontend framework (namely cirrus-ui) with my Django project. For compiling the CSS stylesheet with Sass, I use webpack to compile the s

Django __init__() got an unexpected keyword argument 'user'

Im trying to build a password reset system using the default django libraries. The problem is after trying to enter the site which is for changing it (PasswordC

Summernote Icons not showing using django-summernote

(Note: Issue resolved, see update below) I am using django-summernote and its icons aren't loading. I have followed multiple suggestions on other stack posts (

Deploying FrontEnd and BackEnd as two separate applications with Google Cloud App Engine

I have two application that I want to deploy with Google Cloud App Engine. One of them is react front end, and I want to serve this through www.videoo.io Second

How to have multiple Auth models in django

I have an application where I've two models both models have same fields client buyer I'm using separate models because client can also signs up as a buyer usin

how to link a div using <a href> to appear in the middle of the screen instead of top?

this is to go back to home page that has a listview of posts and to keep the screen at where the post is located after clicking go back button in the post detai

DRF ModelSerializer meta extra_kwargs not working for related fields

I am developing an API in DRF and have stumbled upon one issue that hopefully you can help me to solve. Let's assume I have the following model and a serializer

How to mention users using @ in django

I have been working on a project on django and it is very similar to instagram and twitter, one of the functions it needs to have is to mention users using "@"

GIS - Can i have multple geo_fields (point, polygon, line) in 1 model and then serialize with DRF?

If I have 1 model with 3 different geo_fields in (point, poly and line), can I serialize all of these with django-rest-framework-gis? My model: class Job(BaseMo

A problem with django using DefaultRouterWithNest

router2 = DefaultRouterWithNest() ( router2.register(r'eva',eval.Evadetail, basename='eva') .register(r'evand',eval.Evand,basename='eva-evand',p

Clean request.data in django rest

Quick question: I know that Django has some baked-in security at different system levels, but I'm not sure if accessing the the request.data property directly s

CSS not applied to the HTML page (Django)

index.html I have changed {% static "/main/css/index.css" %} to {% static "main/css/index.css" %} {% extends 'main/base.html' %} {% load static %} <

Using CreateView with 2 Models at the same time

should I be building a function to achieve what I am trying to do?