I've added a Comment model to my application, but when the form is submitted, this error pops: NOT NULL constraint failed: blog_comment.post_id Here's models
Collecting psycopg2 Using cached psycopg2-2.9.3.tar.gz (380 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup
i have relation between Project and ProjectFloorPlan, and i want to display ProjectFloorPlan data in my template. Please let me know how i can display the Forei
i have relation between Project and ProjectFloorPlan, and i want to display ProjectFloorPlan data in my template. Please let me know how i can display the Forei
I have two classes in my sqlite database, a parent table named Categorie and the child table called Article. I created first the child table class and addes ent
I have added foreign keys to some of the models in a Django application but the changes are not being reflected in the MySQL database even after migrating them.
I am trying to handle ProtectedError exception and try to post a custom error message in my template. def delete(self, request, *args, **kwargs): obj = sel
So i want to make models form to upload file mp3. I was copy the code from website, but suddenly it goes error. Here's error message on the website : Forbidden
In a django 2.0 app I have a model, called Document, that uploads and saves an image to the file system. That part works. I am performing some facial recognitio
I am trying to build a website that users can add the courses they are taking. I want to know how should I add the ManyToMany relationship. Such that we can ge
What is the difference between the Model.clean() method and the Model.clean_fields() method?. When should I use one or the other?. According to the Model.clean
I'm trying to extend the built-in user and add some more information to it. I have two apps in my django project- general and user_details. Inside my user_detai
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