Projet

Général

Profil

Bug #20530

warnings RemovedInDjango19Warning

Ajouté par Thomas Noël il y a plus de 6 ans. Mis à jour il y a plus de 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
08 décembre 2017
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

Visibles au moins lorsqu'on lance les tests :

  /home/thomas/dev/publik/venv/local/lib/python2.7/site-packages/django/contrib/contenttypes/models.py:161: RemovedInDjango19Warning: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
    class ContentType(models.Model):
  /home/thomas/dev/publik/venv/local/lib/python2.7/site-packages/django/contrib/auth/models.py:41: RemovedInDjango19Warning: Model class django.contrib.auth.models.Permission doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
    class Permission(models.Model):
  /home/thomas/dev/publik/venv/local/lib/python2.7/site-packages/django/contrib/auth/models.py:98: RemovedInDjango19Warning: Model class django.contrib.auth.models.Group doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
    class Group(models.Model):
  /home/thomas/dev/publik/venv/local/lib/python2.7/site-packages/django/contrib/auth/models.py:436: RemovedInDjango19Warning: Model class django.contrib.auth.models.User doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
    class User(AbstractUser):

Fichiers

Révisions associées

Révision 8cf53dd4 (diff)
Ajouté par Thomas Noël il y a plus de 6 ans

remove useless context_processors.auth in settings (#20530)

Historique

#1

Mis à jour par Thomas Noël il y a plus de 6 ans

C'est lié à la présence de django.contrib.auth.context_processors.auth dans settings.TEMPLATE_CONTEXT_PROCESSORS (qui fait un from django.contrib.auth.models import AnonymousUser qui lui-même charge from django.contrib.contenttypes.models import ContentType).

J'ai l'impression que ce context_processors ne nous sert à rien, puisqu'on n'utilise pas django.contrib.auth... non ?

#2

Mis à jour par Thomas Noël il y a plus de 6 ans

Les tests passent (et plus aucun warning) avec ça.

#3

Mis à jour par Frédéric Péters il y a plus de 6 ans

Supprimer la ligne plutôt ?

#5

Mis à jour par Frédéric Péters il y a plus de 6 ans

Ok.

#6

Mis à jour par Thomas Noël il y a plus de 6 ans

  • Statut changé de En cours à Résolu (à déployer)
commit 8cf53dd4dea606b7679319f1e7f39a8735582af8
Author: Thomas NOEL <tnoel@entrouvert.com>
Date:   Fri Dec 8 10:49:55 2017 +0100

    remove useless context_processors.auth in settings (#20530)

#7

Mis à jour par Frédéric Péters il y a plus de 5 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF