Questions tagged [django-2.2]

Django 2.2 is a version of the Django framework, released April 2019. It is a Long Term Support (LTS) release, and will be supported until at least April 2022. Please only use this tag if your question relates specifically to this version.

Django 2.2 works with Python 3.5, 3.6, 3.7, 3.8, and 3.9.

release notes

261 questions
4
votes
1 answer

logout() got an unexpected keyword argument 'next_page'

Are there no next_page or template_name arguments in Django 2.2 for logout and login? I got these errors when upgraded from Django 1.11 to Django 2.2!! This is my urls.py from django.contrib.auth import logout url(r'^logout/$',logout, {'next_page':…
Venkatesh Gotimukul
  • 741
  • 1
  • 9
  • 30
3
votes
3 answers

Django exclude query, can i pass multiple parameters?

I have a query and i want to exclude null companies as well as specific user email. Demo.objects.all().exclude(company__isnull=True, email="abc@gmail.com") but seems like above exclude does not work with multiple arguments, my return queryset has…
3
votes
2 answers

OSError: no library called "cairo" error even after installing macports

I'm getting this error when trying to start the Django server by using the python manage.py runserver command. OSError: no library called "cairo" was found no library called "libcairo-2" was found cannot load library 'libcairo.so.2':…
Swathi C
  • 31
  • 2
3
votes
1 answer

How to pass multi optional URL parameters in django?

How to pass multi optional URL parameters? For example I want pass 2 params: my_color and my_year, but they are optional, so may be none of them will be passed, may be both, or may be only one. Currently in urls.py I have : urlpatterns = [ …
Oto Shavadze
  • 40,603
  • 55
  • 152
  • 236
3
votes
1 answer

Migrating to Django 2.2 from 1.11 -- old migrations without on_delete in ForeignKey break everything

I'm working on upgrading my legacy application from Django 1.11.13 to 2.2.8. I've dutifully addressed every compatibility issue, but I've hit one I can't figure out how to resolve. When I try to start the webserver in my local environment, I get…
TAH
  • 1,658
  • 1
  • 19
  • 37
3
votes
2 answers

Proper implementation of Django model inheritance architecture?

I'm building a simple Django app for reviews of different objects (restaurants, car services, car wash etc). I started with the app, but soon I faced first problem. Every object has features (but every type of object has different features). For…
MorganFreeFarm
  • 3,811
  • 8
  • 23
  • 46
3
votes
1 answer

How To Use BeautifulSoup In Django?

I was trying to create a website in Django, which basically scrapes the data from google news and puts it on my website. But I didn't know how to use the data that I extracted from google news in my Django HTML file. Is there a way that I could do…
Heisenberg
  • 475
  • 8
  • 24
3
votes
1 answer

Django UpdateView with unique fields

Is there a way to update a unique field in update view? I have a model that has a name and age field but when I try to update the age without even changing the value of the name, it returns an error that the name already exists in the…
dahyunism
  • 55
  • 5
3
votes
0 answers

Django-ORM - passing annotated column names into a Subquery?

I have constructed the following query "chain": survey_results = OrganisationSurveyResult.objects.filter(user=user) survey_results = survey_results.filter( created_date__in=survey_results.values( 'user', 'organisation_survey' …
Micheal J. Roberts
  • 3,735
  • 4
  • 37
  • 76
3
votes
1 answer

Django: Peer authentication failed for user

I've already a functioning website that use sqlite3 but I prefer to restart my website project with an empty project that immediately use PostgreSQL/PostGIS. At the end of the configuration of settings.py I will make a dump for upload all the…
MaxDragonheart
  • 1,117
  • 13
  • 34
3
votes
0 answers

expected string or bytes-like object in Django save() method

I have Job Model that I can see list of them, create new one and see details of one of them. But when I want to edit objects of this model, I got this error: match = datetime_re.match(value) TypeError: expected string or bytes-like object And in…
rahnama7m
  • 865
  • 10
  • 38
3
votes
1 answer

Upgrade django-synchro for django 2.2 : OperationalError - no such table: django_content_type"

I am trying to upgrade django-synchro to django 2.2. I have already upgraded the project to django 2.1 but I have now a problem with ContentType object The upgraded version to django 2.1 can be found here (python runtests.py works, all tests…
Mlier
  • 111
  • 1
  • 4
3
votes
1 answer

Getting Error when importing format_suffix_patterns from Django Rest Framework

I am learning Django Rest Framework. I used format_suffix_patterns to support suffixes in the Urls Everything was fine, till suddenly I started getting error _frozen_importlib._DeadlockError: deadlock detected by _ModuleLock('django.test.signals')…
Adnan Sabbir
  • 181
  • 1
  • 13
2
votes
2 answers

send_message not sending message for pytelegrambotapi

I am trying to make a simple tg bot in python using django and pyTelegramBotApi, which is answering "Hello" on a /start. I've set webhook, and bot is getting updates correctly, but when it comes to send_message it just goes trough and sends…
sudden_appearance
  • 1,968
  • 1
  • 4
  • 15
2
votes
1 answer

Letting Users Delete their own accounts in Django

In the Django 2.2 docs , it states the following : "is_active " is a Boolean. Designates whether this user account should be considered active. We recommend that you set this flag to False instead of deleting accounts; that way, if your…
e rosario
  • 29
  • 5
1
2
3
17 18