Re: Query help

2021-09-20 Thread Lalit Suthar
Sum, Count works when we try to get sum/count for a column, for this case you can try something like this def get_yes_count_by(id): user = User.objects.get(id=id) count = 0 for val in user.__dict__.values(): if val == "YES": count += 1 return count On Tue, 21

Re: Query help

2021-09-20 Thread Sean Collins
Add a property to count Y for each column Or add a computed field that tallies that on save For reference https://stackoverflow.com/questions/1454727/do-properties-work-on-django-model-fields On Mon, Sep 20, 2021 at 6:41 PM J.T. wrote: > I have a model called member that has 6 columns: ID,

Re: need help integrating SSL with react/django web app

2021-09-20 Thread David Nugent
On Tue, Sep 21, 2021 at 2:11 AM hey there wrote: 1. oracle autonomous linux's epl dont have certbot > pip install certbot You already have pip installed if you're running Django. This takes all of 10-15 seconds... and > 2. I mostly like Cloudflare than certbot because Cloudflare has some own

Query help

2021-09-20 Thread J.T.
I have a model called member that has 6 columns: ID, Value1, Value2, Value3, Value4, Value5 The values in columns Value1, Value2, Value3, Value4, Value5 are either Y or N. I'm trying to query by ID to count the number of Y values for each member. For example one row would be: 5, Y, N, Y, N,

Django formset ID error ...Cannot resolve keyword

2021-09-20 Thread Shane Sibbett
Hello, I am learning Django, I need help with my Django formset. The template-webpage would open when I just had a regular form but the look and feel was not what I wanted. I decided that I wanted to develop a formset. Along with the formset I want some values to populate automatically so the

Re: need help integrating SSL with react/django web app

2021-09-20 Thread hey there
1. oracle autonomous linux's epl dont have certbot and 2. I mostly like Cloudflare than certbot because Cloudflare has some own methods to maintain ssl certificate On Mon, Sep 20, 2021 at 2:37 PM FIRDOUS BHAT wrote: > Why don't you explore certbot? > > On Sun, Sep 19, 2021, 8:14 PM MR INDIA

What is different about "./manage.py shell" vs. normal Python shell that makes this list comprehension not work anymore?

2021-09-20 Thread cseb...@gmail.com
I noticed a list comprehension bombs in the "./manage.py shell" shell that I think would be ok in normal Python shell. What is different about "./manage.py shell" that makes it not like certain list comprehensions? Here is the code erase that I run this way..."./manage.py shell < erase" import

Re: django-admin doesn't display choices and it's not possible to select one

2021-09-20 Thread bnmng
Hi. I don't see anything in your code samples that would cause this. One line in admin.py caused the server to stop because of the extra parenthesis, and the default for status should be 'r' instead of 'refereed', but those don't cause the problem you're describing. Maybe a browser issue?

Re: need help integrating SSL with react/django web app

2021-09-20 Thread FIRDOUS BHAT
Why don't you explore certbot? On Sun, Sep 19, 2021, 8:14 PM MR INDIA wrote: > Select os and server and it will show the docs, you have to first shutdown > the server then after following the docs restart the server. > > > On Saturday, 18 September 2021 at 19:33:31 UTC+5:30 hey there wrote: >

context.py values not render into tamplate when log in from email link

2021-09-20 Thread Sujata Aghor
I have set some variables in context.py, which need to be rendered in the base template of an application. It's working fine when I normally log in into the system. BUT I have an email workflow feature. So when I log in via a link in email, that time it won't render the values in the base

Re: Idea

2021-09-20 Thread David Nugent
Not at all a "new" topic :-) On Sun, Sep 19, 2021 at 8:11 AM Jet Ezra wrote: > I know this may not be necessary at the moment because we are comfortable > depending on front-end frameworks, but I have my two ideas here: > 1. what if django alone without any framework can be used to design >

Re: 'str' object is not callable error appears from Django Message Framework

2021-09-20 Thread David Nugent
Hi Salima, Stack trace? Always the first call for triage on python exceptions. Also (and unrelated to your issue) google "django messages bootstrap" and check on how to avoid the {% if message.tags == .. %} horror show and make your templates much more readable/easily maintained. On Mon, Sep