Category "django"

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',

Replacement in python package in Docker

GraphQL is still not supported in Django 4, so to use it I need to change the line: "from django.utils.encoding import force_text" to "from django.utils.encodin

Django / Ubuntu 20 - How change to a previous version of GDAL

first of all, thanks for your help. I'm new to django, and I'm developing a site where you have to enter coordinates in some forms and then they should be edit

Url decoding problem on deployment with IIS and FastCGI on windows server

I realized an app front Angular, back-end Django, deployed on Windows server using IIS and FastCGI. This app serves media files on a certain URL. It works fine

When django load data to memory?

Lets have simple model: class NewModel(models.Model): json_data = models.JSONField(default=dict) Then lets get it: model = NewModel.objects.get(pk=1)

WARNING: autodoc: failed to import module 'upload_data_to_server' from module 'manual';

I'm trying to document a Django project using Sphinx's autodoc extension. I have two main problems: It's documenting excessivelly in some modules (importing doc

I want to assign value of logged in user's user_company to the user_company field of the newly created user

When a user creates a user record for a client, the new client should should have the current logged in user's User.user_company value. In the problem here, I w

Bokeh: Generate graph server side, update graph from JS client side (change data source, axes ...)

I just took Bokeh for a spin on a Django site. Lot of fine tutorials out there and really easy to get a quick example running. For example, I have a Django view

How to optimize the downlaod big file problem in Django?

My Django project gives a download interface as follows: def download_item_vector(request): return HttpResponse(np.load('item_vector.npy')) I want to retur

React app won't connect to django-rest database

I'm to update the frontend of this site https://github.com/ildebr/store-repository it has a react frontend and a Django backend, auth is made with Django-rest-f

Testing UX with random IO?

So I've found a error in my UX that wasn't cought by test if I press besides a popup it goes into deadstate # they press ok btn = self.browser_adam.find_element

Is it possible to allow to create objects from the list_display view of the django admin site?

I have a model with fields name, roll_no, birth_date I am using the django admin's list display and list editable to have these fields displayed and edited in a

Django import-export how to handle blank Charfield

I'm trying to import some data with django import-export module. I'm having a problem and can't find any solutions to it despite the fact that it seems to be a

Using django-extensions to generate a model graph in PNG format using Windows 10 (without using Conda or Anaconda)

I am using django-extensions to generate a model graph for my Django application. My installation steps are the following: $ pip install django-extensions $ pip