hi all,
here a relative new Django user. When I’m trying to import a PostgreSQL table with inspectdb I get the issue that my encoding changes from UTF-8 to UTF 16-le, what I’m doing wrong? My PostgreSQL database is in UTF-8 and my original models.py to (until I execute the inspectdb).
here my database table:
CREATE TABLE public.rainbucket (
berichtid varchar(40) NOT NULL,
device_id text NULL,
ontvangsttijd timestamp(6) NULL DEFAULT now(),
batterij_voltage float8 NULL,
cumulative_precipitation float8 NULL,
precipitation float8 NULL,
precipitation_interval float8 NULL,
isodow int4 NULL DEFAULT date_part(‘isodow’::text, now()),
“time” time NULL DEFAULT now()
);
and my class after I execute “python manage.py inspectdb rainbucket > myapi\models.py”
does anyone know a solution because I couldn’t find documentation about it?