Questions tagged [django-3.1]

Django 3.1 is a version of the Django framework, released in August 2020. Please only use this tag if your question relates specifically to this version.

Django 3.1 works with Python 3.6, 3.7, 3.8, and 3.9.

Here are some of the salient features of Django 3.1:

Django 3.1 was released in August 2020 and was supported until August 2022.

126 questions
-1
votes
1 answer

Django 3.1: Access objects in template of ModelChoiceField

Using Django 3.1 and I'm struggling with a basic tasks. I've got a form with a field like this: forms.ModelChoiceField(queryset=StorageSpace.objects.filter(visible=True), widget=forms.RadioSelect) I would like to do this in my view: {% for space in…
Remo
  • 1,112
  • 2
  • 12
  • 25
-1
votes
1 answer

Why django is accepting two diiferent passwords? Giving no error at all

Why this code is accepting both password and confirm_password field? without errors Here is first models.py file: (indent is not a problem here) from django.db import models from django.contrib.auth.models import AbstractBaseUser from .managers…
Rajat Jog
  • 197
  • 1
  • 10
-1
votes
2 answers

Django 3.1, I'm NOT getting RelatedObjectDoesNotExist error for User and Profile models

as the title reads I'm NOT getting the RelatedObjectDoesNotExist error in Django 3.1(Latest Release) I'm not using signals. I create a superuser using the (python manage.py createsuperuser) command, which, as expected, does not create a…
-2
votes
2 answers

How do I turn off CSRF checks with Django auth's PasswordResetView?

I'm using Django 3.1 with Django's auth application. I have the following middleware defined MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', …
Dave
  • 15,639
  • 133
  • 442
  • 830
-2
votes
1 answer

Django 3.1: Development implication of creating a custom dashboard instead of using Django Admin

I am a novice in Django. I am just wondering why most developers would create separate dashboards to login and logout to perform all the CRUD functions. Why go through all that trouble instead of using the shipped Admin panel and create your users…
-2
votes
1 answer

select branch_id from report group by branch_id order by max(date) desc to Django Query

I have a model with the following fields id -> int vivitor_id -> int branch_id -> int date -> datetime I need to perform the following query in Django. How to do this using Django ORM. select branch_id from report group by branch_id order by…
Abhijith Konnayil
  • 4,067
  • 6
  • 23
  • 49
1 2 3
8
9