Category "django"

The code is forcing the user to change the image also when he want to change only other properties of his article

Hello everyone I have a blog platform, the user can add and edit blog. I used Django and Django Rest Framework to build the website, and for the frontend ReactJ

Best way to provide admin role from Django REST to ReactJS

The default django user model has a is_superuser field. I would like to use this field to conditionally render components in react, i.e. get something like this

Install grpcio via pip: "legacy-install-failure"

I want to install grpcio with pip(version 1.35). But I get this error: note: This error originates from a subprocess, and is likely not a problem with pip. erro

Created Field(DateTimeField) auto_now_add=True is not working in Abstract Class in Django

class TimeStampMixin(models.Model): id = models.CharField(max_length=60,editable=False,primary_key=True,default=generate_unique_id) created = models.Dat

Django does not create foreign key in sqlite table [closed]

I use sqlite in a Django project. I created a model called Employee, and then Education, but I forgot to add a foreign key to Employee. When I

Django - Show all ForeignKeys belonging to the given ID as a select multiple field

I have this model: class OrderProduct(models.Model): order = models.ForeignKey(to=Order, on_delete=models.CASCADE) product = models.ForeignKey(to=Produc

right way to deploy a django-rq worker

maybe it's a silly question, but I didn't found much while googling around. So I'm on the way to transform my development environment to a deploy environment. I

Can't find the error in my django project

I am creating a booking website for hotels using Django, I used the booking api to get the hotels with its images and location highlights... I sent to the djang

Django-How can I upload image to a Model, without that field being present in the ModelForm

I am trying to build an image steganography application and for the encoding part I have a form with two fields, one for image and one for the message that is t

find top performing list of category which have highest number of orders in django

models.py class Line_items(models.Model): id = models.AutoField(primary_key=True) product = models.ForeignKey('Products' , on_delete=models.DO_NOTHING ) cl

When saving ModelFormSet it reads the whole underlying table?

I don't know how to explain the problem in my title, so if someone knows how to better phrase the problem I'm going to describe, I hope there is a way to update

Django models - how to assign as ForeignKey

My lab has a models.py as below: class Book(models.Model): isbn = models.CharField(max_length=10, unique=True) name = models.CharField(max_length=100)

i want to make a chained drop down of my django model

please i want a chained dropdown in such away that it is only when you click on country that state will also be displayed class PollForm(forms.ModelForm): c

Is it possible to link multiple models to one fiel in django?

Let's say I have these models: class Material(models.Model): name = models.CharField([...]) class Consumable(models.Model): name = models.CharField([..

There is another cms for django?(not "django CMS") or why i should use django cms? [closed]

I was trying to create Django-based templates, which I found after a bit of searching on the Django CMS site. But then I went to install it an

how to edit urls.py?

i need to create url with this path graphs/<direction>. The direction should be a string because it's the name of some department. i've tried to do this k

Password validation with UserAttributeSimilarityValidator and CustomUser Django

I am trying to validate a password against CustomUser fields: email and full_name. All test validations are working except for UserAttributeSimilarityValidator,

How can i filter parents that has at least one active child on parent child relationship model

I have "Category" model which has multiple parent/child relationship. class Category(models.Model): pass class CategoryParent(models.Model): parent_cat

drf-yasg, How to add model choices on api doc?

I have a model like this: class User(AbstractUser): PERMISSION_CHOICES = [ (0, 'boss'), (1, 'leader'), (2, 'bro'), (3, 'sis'

Django Admin dependent DropDown HTML field

I have a Region and SubRegion ForeignKey in the Country Model. My SubRegion model also has a Region ForeignKey for the Region Model. I am having a hard time dis