#6957 (Make Lino work with Django 6.1)

by Luc Saffre · in Developers

Kurzbeschreibung

Two minor issues have been fixed (e.g. AttributeError: 'VirtualField' object has no attribute 'related_model' comes when I say pm buildcache in patrols1 after upgrading Django to 6.1.)

Another problem is RuntimeError: Model class django.contrib.auth.models.Permission doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.


Kinder

Kommentare

  • 2 Monate, 2 Wochen ago von Luc Saffre Antwort auf Luc Saffre about #6957 (Make Lino work with Django 6.1) : No longer needed! I found the reason for this.
  • 2 Monate, 2 Wochen ago von Luc Saffre about #6957 (Make Lino work with Django 6.1) (1 Antwort) : @8lurry, does "doctest /docs/projects/noi2.rst" pass on your machine with the latest gitlab versions? I'm asking because I'm currently stuck, I don't understand which of my local changes has caused this. Here is my failure: 164 >>> walk_menu_items('robin', severe=False) Differences (unified diff with -expec...
  • 2 Monate, 2 Wochen ago von Luc Saffre about #6957 (Make Lino work with Django 6.1) : So I now say "Django<6.1" in the lino pyproject.toml file. I still want to keep my changes of "Message.owner" becoming "Message._meta.get_field("owner")" because they will be needed in Django 6.1, but right now my test suite is still failing after these changes and I didn't yet understand why. Seems...
  • 2 Monate, 2 Wochen ago von Luc Saffre about #6957 (Make Lino work with Django 6.1) : Oh, the third problem is more difficult: django.test.Client now does multiple hard-coded "from django.contrib.auth import ...", which doesn't work because in Lino we use lino.core.auth, which is a modified copy of django.contrib.auth. The best solution might be to "return" to the Django auth module....
  • 2 Monate, 2 Wochen ago von Luc Saffre Antwort auf Luc Saffre about #6957 (Make Lino work with Django 6.1) : No, instead of saying "gfk2lookup(Mention.owner.field, self)" we must say "gfk2lookup(Mention._meta.get_field('owner').field, self)".
  • 2 Monate, 2 Wochen ago von Luc Saffre about #6957 (Make Lino work with Django 6.1) (1 Antwort) : I added a class attribute related_model = None to FakeField. This fixed the problem and i didn't dig deeper. And another issue was because GenericForeignKey now uses a separate descriptor class: the private GenericForeignKeyDescriptor. (Release notes for Django 6.1). Instead of saying "gfk2lookup(Me...
  • 2 Monate, 2 Wochen ago von Luc Saffre about #6957 (Make Lino work with Django 6.1) : Created new Ticket #6957 (AttributeError: 'VirtualField' object has no attribute 'related_model').