Category "django"

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?

dj-rest-auth Reset email link keeps pointing to the backend

I'm using dj-rest-auth with react and i'm trying to use the frontend url instead of the backend url. The solution i am using for the account creation confirmati

psycopg2.errors.InsufficientPrivilege: permission denied for relation django_migrations

What my settings.py for DB looks like: ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2',