Complex DB query fun

2021-02-06 Thread Samuel Smith
I have a blog that is using django-taggit and on my list and detail views, I'd like to have a section to display other posts with related tags. At first I thought I could just use a correlated sub-select with annotate() along with the postgresql string_agg() to squeeze the related blog post's t

server.starttls() error while sending Emails

2021-02-06 Thread Akorede Habeebullah
Hi there, I'm trying to send emails with python using smtp.gmail.com but I've been getting this error: [image: Screenshot from 2021-02-06 23-46-55.png] Here is a screenshot of my code: [image: Screenshot from 2021-02-06 23-45-01.png] I've tried unlocking captcha for the Gmail account to reduce t

Model.objects.create as default

2021-02-06 Thread degnon...@gmail.com
hi, say I have this model class Event(models.Model): ... metrics = models.OneToOneField("evmetrics.Metrics", on_delete=models.PROTECT, default=Metrics.objects.create) I want to be sure of what I'm writing here, for each new Event object created, a new Metrics object will be create and link

Re: Using a RadioSelect widget with ModelChoiceField

2021-02-06 Thread Matt Rowbottom
Hi wne Thanks again for the suggestion, but those solutions are for how to make a `ChoiceField` behave like a `ModelChoiceField`. My `ModelChoiceField` works fine while the default `Select` widget is used. But when I use the `RadioSelect` widget the blank option disappears. This only occurs i

Re: not proceed any further on runtests.py

2021-02-06 Thread Eric Ahn
Shoud I set up on runtests.py or add configuration to django? I add more details : I referenced https://docs.djangoproject.com/en/3.1/intro/contributing/ and $ cd django/tests $ ./runtests.py Testing against Django installed in '/django/django' with up to 8 processes Creating test database