Questions tagged [django-3.2]

Django 3.2 is the current LTS version of the Django framework, released April 2021. It is a Long Term Support (LTS) release, and will be supported until April 2024. Please only use this tag if your question relates specifically to this version.

Django 3.2 works with Python 3.6, 3.7, 3.8, 3.9, and 3.10.

Here are some of the salient features of Django 3.2:

Django 3.2 was released in April 2021 and is supported until April 2024.

128 questions
1
vote
0 answers

Django: Could not load model - NOT NULL constraint failed

how are you all? We are not able to insert the fixures data into our SQLite3 database. We are using UUid as our model id. Using the comand python.exe .\manage.py loaddata start.json Model class Estadual(models.Model): # Fields id =…
marcelo.delta
  • 2,730
  • 5
  • 36
  • 71
1
vote
0 answers

Django( version 2.1.1) Admin panel change after upgrade to Django( version 3.2)

What did I do? I have upgrade Django(version 2.1.1) from Django(version 3.2) on Ubuntu 18.04 server What did I expect to happen? I was expecting the same admin panel but got a different admin panel. As you can see in the screenshot OS: Ubuntu…
1
vote
0 answers

django-cors-headers issue with Python 3.9 and Django 3.2.0

I have spent almost a day without any solution to this problem. I have applied all the solutions suggested by different folks on different forums. Recently we have upgraded the Python version of our project from 3.5 to 3.9. Upgraded Django version…
sandeep
  • 3,061
  • 11
  • 35
  • 54
1
vote
1 answer

gunicorn Serve Error(500) in django 3.2 app on localhost

I'm trying to serve my Django 3.2 application using gunicorn on my localhost. First time, it ran correctly. Later, I changed DEBUG parameter to False in settings.py and I run it again. This time it gives me a server error. In terminal there is no…
Hirusha Fernando
  • 1,156
  • 10
  • 29
1
vote
0 answers

Setting up continuous integration with django 3, postgres and gitlab CI

I'm setting up a continuous integration with Django 3 and Gitlab CI. Having done it previously with Django 2 but now I'm struggling to get things done with Django 3. This warning is shown and I'm wondering if it's the reason…
sk001
  • 561
  • 6
  • 27
1
vote
1 answer

django rest api getting KeyError: 'image'

trying to create a function based post api views.py: @api_view(['POST']) @permission_classes([IsAuthenticated]) def post_blog(request): user = request.user data = request.data if data['image'] and len(data['image']) == 0: blog =…
techedifice
  • 163
  • 1
  • 11
1
vote
1 answer

Django Signals set signal to create a default avatar image on UserExtended model after registering User

I want to create an entry on UserExtended model after registering an user on Django default user model. here is UserExtended model: class UserExtended(models.Model): extended_id = models.AutoField(primary_key=True, editable=False) avatar =…
techedifice
  • 163
  • 1
  • 11
1
vote
1 answer

django admin filter_list by manytomany filed

models.py class Author(models.Model): nickname = models.CharField(max_length=100) class Book(models.Model): title = models.CharField(max_length=255) authors = models.ManyToManyField(Author) admin.py @admin.register(Book) class…
originull4
  • 21
  • 1
1
vote
1 answer

Not able to get the requested URL in django new version

When the default url http://127.0.0.1:8000/ is given then the app is able to get the default page but when I tried to connect with the pages using http://127.0.0.1:8000/customer/ I'm getting this error as a traceback Page not found (404) Request…
Selva
  • 23
  • 5
1
vote
0 answers

Django 3.2 LookupError: Model not registered

While trying to upgrade an existing project to Django 3.2 (from 2.2), I have been getting the following error: ... from .permissionmodels import * # nopyflakes File…
MadPhysicist
  • 5,401
  • 11
  • 42
  • 107
1
vote
3 answers

Want to perform left join in django

Say I've 2 models Model Users: Name: Id: And attendance Model Attendance: user: foreign_key(User) present: [present if login else nothing recorded] Date: users = User.objects.all() todays_present =…
1
vote
1 answer

Greater than Index in Django

In Django-3.2 class Index get a positional argument expressions which allows to create functional indexes on expressions Is it possible to create index on Integer field with expression greater? For example My model: class Product(models.Model): …
Headmaster
  • 2,008
  • 4
  • 24
  • 51
1
vote
1 answer

Django unit test is not finding any test

I want to run a unit test on test_models.py the contents of the file is below: from django.test import TestCase from django.contrib.auth import get_user_model class ModelTest(TestCase): def test_create_user_with_email_successful(self): …
techedifice
  • 163
  • 1
  • 11
1
vote
0 answers

Is there a way to display the extra forms at the top when using django InlineModelAdmin instead of the bottom after all the existing forms?

Am using inlines(InlineModelAdmin) in my django Admin interface to make it easier to edit the models of the Parent model. However, by default, the extra forms for models appear at the bottom. The problem is that there may be a lot of previous…
Wasswa Samuel
  • 2,139
  • 3
  • 30
  • 54
1
vote
3 answers

how can i use path Django for locating and loading templates? Django 3.2

in django3.2 I was trying this to uses for locating and loading templates? but doesn't work with me TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ` [BASE_DIR / 'templates']`, …
Badr Ozgar
  • 31
  • 4
1 2 3
8 9