Re: New Add-On: Django Model Lifecycle Hooks

2018-04-01 Thread Jani Tiainen
Hi, Quite interesting feature have to say. You should use tox to run tests against different versions of Django/Python to make it easier to make it compatible easier. I would like to see compatibilities with 1.11 and 2.0 since 1.11 is LTS and 2.0 is latest supported. But it's a great start. On

Re: Decoupling Postgres database credentials in django for deployment.

2018-04-01 Thread PASCUAL Eric
How is github "security" going to help you keep your passwords safe IMHO, it does not. As you wrote, env vars configured on the target system (be it a bare server or a Dockerized environment in the cloud) seem to be safer on this point since not stored anywhere but on the target. Eric

Re: Overriding channel-layer's group_send and group_add to add persistence

2018-04-01 Thread 'Alex' via Django users
I have a partial solution to this, if anybody is interested. For some reason, creating a new version of the core.py file in which RedisChannelLayer is defined, and editing it directly, gave the desired results. It was something about overriding only part of it, but I have no idea what! On Frid

How to run an external command that must run with the server

2018-04-01 Thread 'Alex' via Django users
I have a daphne server running a django channels application. I also have a python script that aggregates data from various sources, and sticks it into the channel layer (called source.py). At the moment, I run it as a management command (python manage.py source). It is nearly time for deployme

Re: How to run an external command that must run with the server

2018-04-01 Thread Ken Whitesell
We set up all our Django-related processes as a group under supervisor. This includes our celery-based processes. (We have some long-running tasks that are kicked off by the web site.) By setting it up as a group, we can manage all the different processes as a set. Whether or not that's the "b

when i import large data to db using django orm, the django orm use too many memory

2018-04-01 Thread jingniao
django.db.backends.base.base.BaseDatabaseWrapper self.queries_limit is 9000 which will effect self.queries_log, this is a query log cache when I import a large data to db use Models.objects.bulk_create function the long sql will be cache, so will be out out memory -- You received this message

Re: when i import large data to db using django orm, the django orm use too many memory

2018-04-01 Thread Jani Tiainen
Hi, You need to set DEBUG = False to disable SQL logging. Better yet, don't use Django for large data import (it's not very suitable for that) but use your database tools for that. On Sun, Apr 1, 2018 at 1:07 PM, jingniao wrote: > django.db.backends.base.base.BaseDatabaseWrapper > self.qu

Re: when i import large data to db using django orm, the django orm use too many memory

2018-04-01 Thread jingniao
thanks 在 2018年4月1日星期日 UTC+8下午9:35:43,Jani Tiainen写道: > > Hi, > > You need to set DEBUG = False to disable SQL logging. > > Better yet, don't use Django for large data import (it's not very suitable > for that) but use your database tools for that. > > > On Sun, Apr 1, 2018 at 1:07 PM, jingniao >

Request Timed Out When Generating Huge Data

2018-04-01 Thread tango ward
Good day, I need suggestions on how to approach this problem. I am working on a task that needs to generate the list students per school. When the school has larger number of students, I am getting a request timed out error. I can filter the school per campus to lessen the number of students but

Re: Request Timed Out When Generating Huge Data

2018-04-01 Thread Babatunde Akinyanmi
Hi, How many records are we talking about? What code are you using to fetch the records? In other words, add more information so that it's easier to troubleshoot On Mon, 2 Apr 2018, 02:27 tango ward, wrote: > > Good day, > > I need suggestions on how to approach this problem. > > I am working on