#4930 (pm install should not call django.setup)

by Sharif Mehedi · in Developers · assigned to Sharif Mehedi

Kurzbeschreibung

Kinder

Kommentare

  • 3 Jahre, 6 Monate ago von Luc Saffre about #4930 (pm install should not call django.setup) : @8lurry please close this ticket when you agree that it is done.
  • 3 Jahre, 6 Monate ago von Luc Saffre about #4930 (pm install should not call django.setup) : Lino is right: the "try...except ImportError" for optional requirements might seem tedious to write, but the mechanism makes sense. I started a [url dev.lino-framework.org/topics/requirements.html topic page] to explain this.
  • 3 Jahre, 6 Monate ago von Sharif Mehedi about #4930 (pm install should not call django.setup) (1 Antwort) : It seem the my initial implementation was wrong. SiteUtility was a bad idea. Taking a Site instance is not possible when there's a package missing. I can't think of a good way to implement this right now.
  • 3 Jahre, 6 Monate ago von Luc Saffre Antwort auf Sharif Mehedi about #4930 (pm install should not call django.setup) : At first I was a bit scared of the idea, but yes let's go for it. It means that with a Lino site hosters always *must* use a manage.py file. That's no problem for us because we always have a manage,py file. But there might be Django hosters around there who use only "django-admin --settings XXX" and...
  • 3 Jahre, 6 Monate ago von Sharif Mehedi about #4930 (pm install should not call django.setup) (1 Antwort) : getlino startsite is designed for a production site. If we modify a demo site. getlino will have a hard time finding the settings module. I think it probably should be done through the manage.py. Which already has the settings_module on it.
  • 3 Jahre, 6 Monate ago von Luc Saffre about #4930 (pm install should not call django.setup) : That might be a great idea! Remove the pm install command and let 'getlino startsite' load the settings and do what pm install did!
  • 3 Jahre, 6 Monate ago von Sharif Mehedi about #4930 (pm install should not call django.setup) : I understand that requirements can depend on site option and plugin option. In that case we take the Site intance and plugin instances, but not try to setup django.
  • 3 Jahre, 6 Monate ago von Sharif Mehedi about #4930 (pm install should not call django.setup) : I am not sure if the get_requirement is a good feature. It's troublesome to do try ... except on every package that is in the get_requirements. We should probably throw it away or try to re-implement it in a different way.
  • 3 Jahre, 6 Monate ago von Sharif Mehedi about #4930 (pm install should not call django.setup) : Created new Ticket #4930 (pm install should not instanciate the Site class and should not call django.setup).