Re: reusable App XOR custom user model?

2020-11-04 Thread ANi
Hi Thomas, The first one focuses on "project" and the second one focuses on "apps". They don't contradict with each, a project may use many apps, they are different. If you want a reusable app then don't include a custom user model in it. Ani. guettli 在 2020年11月4日 星期三上午2:59:37 [UTC+8] 的信中寫道:

data table refresh with Django

2020-11-04 Thread Saurabh Pandey
hi, can anyone suggest how can i get the data refresh in datatable with django axios . here is my code . when the div get new html from the refresh it loses it's pagination and search feature :( load_alerts.html ``` {% for key, value in data.alerts.items%} {{value.timestamp}} {{value.mes

Re: Why when starting Django browser does not display localhost page?

2020-11-04 Thread Владимир Забагонский
Thank you very much! 2020-11-05 5:21 GMT+07:00, Walter Randazzo : > HI dude, if you press "control" key plus click the browser has to come up > with your index.html. > > Regards, > > > El mar., 3 nov. 2020 a las 15:33, Владимир Забагонский > () > escribió: > >> [image: Server.png][image: Server2.p

Re: Django Queryset

2020-11-04 Thread Walter Randazzo
Hi there. Did you try datatable Regards, El mié., 4 nov. 2020 8:30 a. m., lada...@gmail.com escribió: > Hello, Django Users please I need your help and it is urgent, > > I have this code: > *permit_cy = Permit.objects.values(* > > *'info__date_of_transaction__year', > 'info_

Re: Django SECRET KEY

2020-11-04 Thread Michael Rohan
Hi Folks, An extension of this local file is the project django-yamlconf (See https://django-yamlconf.readthedocs.io/en/latest/). It allows general over-ride of settings. It is my project (full disclosure). Take care, Michael. On Wed, Nov 4, 2020 at 3:51 PM Mike Dewhirst wrote: > On 5/11/202

Re: Replicating complex query with two dense_rank() functions using ORM

2020-11-04 Thread Simon Charette
This is unfortunately not possible to do through the ORM right now due to lack of support for filtering against window expressions[0] Until this ticket is solved you'll have to rely on raw SQL. Cheers, Simon [0] ticket https://code.djangoproject.com/ticket/28333 Le mercredi 4 novembre 2020 à 1

Re: Django SECRET KEY

2020-11-04 Thread Mike Dewhirst
On 5/11/2020 1:54 am, Kegan Ronholt wrote: > What is the best practice for hiding SECRET key in settings.py in > production. I am finding all sorts of different ways to do it, but > none seem to work. I keep it in a file left out of the repository but in a "standard" location known to the web serv

How to send a message to all consumers using Django Channels 3.0.0?

2020-11-04 Thread Karam Haj
https://stackoverflow.com/questions/64689093/how-to-send-a-message-to-all-consumers-using-django-channels-3-0-0 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

channels - async consumer behind sync middleware

2020-11-04 Thread Özgür Akçalı
I am using async consumers, and everything they do is async, except for a middleware. I have a custom authentication middleware that connects to the database and runs 2-3 queries. It is suggested in the docs that if anything non-async is done in the consumer, we should use sync consumers. Same

Re: Replicating complex query with two dense_rank() functions using ORM

2020-11-04 Thread Ramon NHB
Hi, In Django queryset you can query PuzzleAnswer, filter by author (assuming that is the user), order_by('created)' and return the created dates only: values_list('created', flat=True). Then take the len() of that list and check the [0] and [-1] entries for first and last date. The rest is dat

Re: run terminal code inside project

2020-11-04 Thread Abdul Madebari
Python manage.py shell On Wed, 4 Nov 2020, 17:55 Mory Sam, wrote: > hi all > > How to use django terminal codes inside your project code > > > example : " python manage.py migrate " code run inside views.py , not terminal > > thanks > > -- > You received this message because you are subscribed

Re: Django SECRET KEY

2020-11-04 Thread Abhishek Choudhury
I use the Environment variable that is in Windows and later in the script I pull the values using os.environ.get('Key_Name') #Since this is a dictionary, we use '' " . *With Best Regards,* Abhishek Choudhury Ph. No.: +91 7903717967 LinkedIN: https://www.linkedin.com/in/yesabhishek/ On Wed,

Django SECRET KEY

2020-11-04 Thread Kegan Ronholt
What is the best practice for hiding SECRET key in settings.py in production. I am finding all sorts of different ways to do it, but none seem to work. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop re

run terminal code inside project

2020-11-04 Thread Mory Sam
hi all How to use django terminal codes inside your project code example : " python manage.py migrate " code run inside views.py , not terminal thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

run terminal code inside project

2020-11-04 Thread Mory Sam
hi all How to use Digingo terminal codes inside your project code? example : "python manage.py migrate" code run inside views.py ,not terminal? thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

Django Queryset

2020-11-04 Thread lada...@gmail.com
Hello, Django Users please I need your help and it is urgent, I have this code: *permit_cy = Permit.objects.values(* *'info__date_of_transaction__year', 'info__country_destination__continent'* *).annotate(volume=Sum('volume')* *).order_by('info__country_destination__cont

Django Channels

2020-11-04 Thread Yeddu Prasad
Hi all, I am trying to learn to setup a django chat using channels. I tried the Channels tutorial at https://channels.readthedocs.io/en/latest/index.html and got into some issues. My issue is as below. When 1st browser joins a room it works just fine. But the moment a new browser session joins