Re: Having problem with first page of first tutorial

2019-03-23 Thread Dylan Young
There is no polls/urls.py file in your repository. Best, Casey On Sat, 23 Mar 2019 at 16:23, Ben Edwards wrote: > Ive not done https://docs.djangoproject.com/en/2.1/intro/tutorial01/ 3 > times and cant get past the first page. Its kind of dryving me nuts. > > Where I am at is in github

Re: Creating Objects from Annotations and Other Models

2019-03-21 Thread Dylan Young
an immediate SELECT. > > Cheers, > Simon > > Le jeudi 21 mars 2019 13:06:04 UTC-4, Dylan Young a écrit : >> >> For example using made-up syntax: >> >> Entry.objects.create(start=F(Recurrence.objects.filter(pk=r_id), >> 'start_time')) >> >> No

Re: Creating Objects from Annotations and Other Models

2019-03-21 Thread Dylan Young
eady present in your > app. > > On Thu, 21 Mar 2019 at 19:06, Dylan Young > wrote: > >> For example using made-up syntax: >> >> Entry.objects.create(start=F(Recurrence.objects.filter(pk=r_id), >> 'start_time')) >> >> Note that we can't u

Re: Creating Objects from Annotations and Other Models

2019-03-21 Thread Dylan Young
For example using made-up syntax: Entry.objects.create(start=F(Recurrence.objects.filter(pk=r_id), 'start_time')) Note that we can't use `get` since the whole point is to avoid all the useless round-trips to the DB. Best, Casey On Thu, 21 Mar 2019 at 13:18, Dylan Young wrote: > I

Re: Creating Objects from Annotations and Other Models

2019-03-21 Thread Dylan Young
e query and then allow you to > refresh this result periodically." - see > http://www.postgresqltutorial.com/postgresql-materialized-views/ > > > On Tuesday, 19 March 2019 17:34:11 UTC+2, Dylan Young wrote: >> >> Hey all: >> >> I often find myself fetching d

Creating Objects from Annotations and Other Models

2019-03-19 Thread Dylan Young
Hey all: I often find myself fetching data from models in the database only to run a few trivial calculations and store the info in a different model. Is there an established ORM pattern for directly creating objects in the DB based on the fields of other models? Sorry if this is obvious, but