3 Mar 2021 |
@nick-matrix:matrix.org | thanks jojo | 20:16:19 |
@nick-matrix:matrix.org | btw i found the answer in r/django reddit. | 20:17:40 |
15 Mar 2021 |
| @nick-matrix:matrix.org left the room. | 18:52:33 |
21 Mar 2021 |
| @amandarose:matrix.org joined the room. | 10:57:41 |
@amandarose:matrix.org | Good evening. http://v.ht/3xEydu | 10:57:41 |
| @amandarose:matrix.org left the room. | 11:10:12 |
22 Mar 2021 |
| @placancomal1972:matrix.org joined the room. | 11:17:30 |
@placancomal1972:matrix.org | Hello, I love sех you will end with me for you URL http://v.ht/k2Zyi | 11:17:30 |
| @placancomal1972:matrix.org left the room. | 11:26:29 |
23 Mar 2021 |
| anobis left the room. | 19:30:46 |
24 Mar 2021 |
| Gordon (they/them) (Old) joined the room. | 09:31:24 |
Gordon (they/them) (Old) | Hi | 09:31:51 |
Gordon (they/them) (Old) | i’m building a project using Wagtail, and i just enabled the postgres_search backend. But the first migration for it fails with:
psycopg2.errors.NotNullViolation: null value in column "id" violates not-null constraint
DETAIL: Failing row contains (null, postgres_search, 0001_initial, 2021-03-24 09:19:32.294944+00).
| 09:32:36 |
Gordon (they/them) (Old) | it seems to come from django itself, but i never met this problem, and i’m having trouble understanding its cause | 09:33:14 |
Gordon (they/them) (Old) | can somebody help me understand it, and fix it? Thanks | 09:34:09 |
@tsyn:matrix.org | Try going into the database itself and find the row that has null in the id column and delete it. It's probably there by mistake anyway and I'd assume it's just a test db anyway | 11:29:26 |
@tsyn:matrix.org | * Try going into the database itself and find the row that has null in the id column and delete it it set it to a non null value that won't collide. It's probably there by mistake anyway and I'd assume it's just a test db anyway | 11:31:44 |
Gordon (they/them) (Old) | Yeah it's inlocal, i've been using sqlite and i just imported a dump of my remote pg base, so that could explain the error. Thanks, i'll try it | 11:34:29 |
Gordon (they/them) (Old) | ok, i fixed it with a clean re-import of the remote base, thanks again | 12:44:18 |
Gordon (they/them) (Old) | now i’m trying to make a search filtered on language, but django complains that the Page model doesn’t have an index for the language. Is that normal? | 12:46:44 |
Gordon (they/them) (Old) | i still don’t know if it’s normal, but i managed to make it work, by adding locale_id as an index and search filter | 12:59:49 |
Gordon (they/them) (Old) | ok, new problem: i’m using wagtail.sites , and i want my search to only return results from the current site, so i’ve written my queryset like Page.objects.live().in_site(request.site).filter(locale_id=current_locale).search(search_query) | 13:09:17 |
Gordon (they/them) (Old) | but since my whole page tree is duplicated to support i18n, every localized version isn’t in the site root | 13:10:17 |
Gordon (they/them) (Old) | i could:
- get the site root page
- get the translated version of this page
- filter the pages that are descendents of the localized root
| 13:12:00 |
Gordon (they/them) (Old) | but it feels quite greedy in queries | 13:12:11 |
Gordon (they/them) (Old) | but in the same time i wouldn’t have to filter the locale anymore | 13:13:18 |
Gordon (they/them) (Old) | (yet, it works) | 13:24:04 |
12 Apr 2021 |
| Gordon (they/them) (Old) changed their profile picture. | 22:01:22 |
14 Apr 2021 |
| @trapmunewsdon1971:matrix.org joined the room. | 15:07:27 |
@trapmunewsdon1971:matrix.org | Hello, why do not you call https://jubybohy.page.link/UtrFGY3B3EqPt6D88 | 15:07:27 |