My models.py file is as follows: from django.db import models from django.utils import timezone from random import randint # Create your models here. class Fil
how do I use nested categories in django as Im nwe to django and doing this and find some solutions but didnt work anything class MainCategory(models.Model)
I've Django model which has foreign keys associated with other models. Each model is having same field names(attributes) created_at and updated_at In every dja
In the official Django 2 tutorial I found this: from django.db import models class Student(models.Model): FRESHMAN = 'FR' SOPHOMORE = 'SO' JUNIOR
I'm having trouble understanding the use of ManyToMany models fields with a through model. I can easily achieve the same without the ManyToMany field. Consideri
Info: I want to upload multiple files using Dropzone js in Django project. I have two models. One for the Post and the other would be for the File. My files mod
I have a relatively simple model in my Django project (I should note that the wording is weird in that the app itself is called 'games' and within it the model
I have recently deployed a Django project to Heroku. While testing out the functionality in the browser, I've come across a new error when attempting to render
I am making use of file fields in my model and I want it to be saved as username_field.jpeg (or whatever format it is in), for example for rent_agreement I want
I am working with Django 3.2, and have come across a problem that seems to have answers here and here also, and I have tried the solutions offered in the accept
I have a Branch model with a foreign key to account (the owner of the branch): class Branch(SafeDeleteModel): _safedelete_policy = SOFT_DELETE_CASCADE
I'm learning Django from Tango with Django but I keep getting this error when I type: python manage.py makemigrations rango python manage.py migrate This is
I am currently using DJANGO How can I make the payment form(code) triggered when a user clickn submit and also make it saved into DB after successful payment. P
I added a new permission to my model, and than used manage.py makemigrations. it created a migration that alters the model options (specificly the permisions..)
I have no idea what may cause this issue. The only change I've made was add the loginquiredmixins to my class-based views. Once I started stylising the login pa
I have an AbstractUser class in models.py file in order to extend the django user default class, class Profile(AbstractUser): address = models.CharField('A
Here I want to create a heatmap when a Lead is created, it'll create an example api for the particular API. This is my lead model and another model for the api,
I have model with a field validator from django.db import models from django.core.validators import MinValueValidator, MaxValueValidator class MyModel(model.
I'm trying to design a database that would save matches and players in a 3v3 game. So far my models look like this : class Player(models.Model): user = mode
The model is class WeeklyStrMst(BaseModel): StoreId = models.AutoField(primary_key=True) TDLinx_No = models.IntegerField(blank=True, null=True, default=