Project

General

Profile

Development #65160

Utiliser la variable INTERNAL_IPS.append plutôt qu'INTERNAL_IPS dans hobo.debug

Added by Benjamin Dauvergne 17 days ago. Updated 12 days ago.

Status:
Solution déployée
Priority:
Normal
Category:
-
Target version:
-
Start date:
12 May 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

publik-devinst configure les briques avec INTERNAL_IPS = ['127.0.0.1'] pour que django-debug-toolbar fonctionne, mais si on joue dans hobo.dev.publik.love/debug/ alors on se retrouve avec INTERNAL_IPS complètement écrasé par la valeur venant de hobo qui est vide ou contient autre chose que '127.0.0.1'. Je pense qu'hobo devrait respecter les valeurs déjà posées globalement et pour cela ne faire qu'ajouter les siennes aux valeurs existantes.


Files


Related issues

Related to Publik - Support #65235: Nettoyer les settings INTERNAL_IPS sur les instances de hoboNouveau13 May 2022

Actions

Associated revisions

Revision 8a7c8156 (diff)
Added by Benjamin Dauvergne 16 days ago

debug: use INTERNAL_IPS.extend to preserve existing values (#65160)

History

#1

Updated by Benjamin Dauvergne 17 days ago

  • Tracker changed from Support to Development
#2

Updated by Benjamin Dauvergne 17 days ago

#3

Updated by Emmanuel Cazenave 16 days ago

>>> settings.INTERNAL_IPS
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/cazino/src/eo/hobo/hobo/multitenant/apps.py", line 20, in <lambda>
    conf.LazySettings.__getattr__ = lambda self, name: getattr(self._wrapped, name)
  File "/home/cazino/src/eo/hobo/hobo/multitenant/settings.py", line 98, in __getattr__
    return getattr(self.get_wrapped(), name)
  File "/home/cazino/src/eo/hobo/hobo/multitenant/settings.py", line 93, in get_wrapped
    return self.get_tenant_settings(tenant)
  File "/home/cazino/src/eo/hobo/hobo/multitenant/settings.py", line 81, in get_tenant_settings
    tenant_settings, last_time = self.load_tenant_settings(tenant, tenant_settings, last_time)
  File "/home/cazino/src/eo/hobo/hobo/multitenant/settings.py", line 68, in load_tenant_settings
    loader.update_settings(tenant_settings, tenant)
  File "/home/cazino/src/eo/hobo/hobo/multitenant/settings_loaders.py", line 33, in update_settings
    self.update_settings_from_path(tenant_settings, path)
  File "/home/cazino/src/eo/hobo/hobo/multitenant/settings_loaders.py", line 226, in update_settings_from_path
    self.handle_settings(tenant_settings, settings_dict)
  File "/home/cazino/src/eo/hobo/hobo/multitenant/settings_loaders.py", line 55, in handle_settings
    method = getattr(self, 'do_%s' % op)
AttributeError: 'SettingsVars' object has no attribute 'do_append'

#5

Updated by Emmanuel Cazenave 16 days ago

  • Status changed from Solution proposée to Solution validée
#6

Updated by Benjamin Dauvergne 16 days ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 8a7c81561cb8f6c117c4c5da7d353b0798a5fa06
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu May 12 11:05:20 2022 +0200

    debug: use INTERNAL_IPS.extend to preserve existing values (#65160)
#7

Updated by Benjamin Dauvergne 16 days ago

  • Related to Support #65235: Nettoyer les settings INTERNAL_IPS sur les instances de hobo added
#8

Updated by Transition automatique 12 days ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF