Easy Pickings: admin change_form label does not use mark_safe

2022-08-22 Thread Caram
I've just opened a ticket for this issue. The problem is that the label is 
not escape. There is no such issue with change_list.html.

https://code.djangoproject.com/ticket/33946#ticket

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/bd289257-bf12-49f6-b8d7-14ea559861aen%40googlegroups.com.


Django 3.2rc1: models.W042 is raised on inherited manually specified primary key.

2021-03-25 Thread Caram

This issue was raised in alpha1, but I still had the issue in beta1 and now 
also in rc1.

As a result, I have to manually edit the migrations files and remove lines 
that alter fields to become BigField().

Has this really been fixed? Am I missing something obvious?

Caram

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/1c5c1726-f21c-42a9-97e2-857a83a44e58n%40googlegroups.com.


Re: Django 3.2rc1: models.W042 is raised on inherited manually specified primary key.

2021-03-25 Thread Caram
Sorry, I meant to do that. Here's the link to the ticket:
https://code.djangoproject.com/ticket/32367

I get an output similar to that of the ticket when I run `./manage 
makemigrations`:

HINT: Configure the DEFAULT_AUTO_FIELD setting or the 
AppConfig.default_auto_field attribute to point to a subclass of AutoField, 
e.g. 'django.db.models.BigAutoField'.
myapp.MyClass: (models.W042) Auto-created primary key used when not 
defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the 
AppConfig.default_auto_field attribute to point to a subclass of AutoField, 
e.g. 'django.db.models.BigAutoField'.

(duplicated about 30 times because I have many such classes) 

The primary key for these models has not changed since Django 0.90 and 
there was no issue in Django 3.1.
It started output HINT messages in Django 3.2 beta 1.
I have the same behaviour in Django 3.2 rc 1.

When I try the suggested workaround from the ticket, i.e.:
   DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

the migrations files contain the following migrations which I neeed to 
remove manually:

migrations.AlterField(
model_name='myclass',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, 
serialize=False, verbose_name='ID'),
),

Caram

Le jeudi 25 mars 2021 à 15:55:27 UTC+1, timog...@gmail.com a écrit :

> Hi, It would be helpful to link to the ticket and/or explain the issue in 
> more detail.
>
> On Thursday, March 25, 2021 at 9:28:09 AM UTC-4 Caram wrote:
>
>>
>> This issue was raised in alpha1, but I still had the issue in beta1 and 
>> now also in rc1.
>>
>> As a result, I have to manually edit the migrations files and remove 
>> lines that alter fields to become BigField().
>>
>> Has this really been fixed? Am I missing something obvious?
>>
>> Caram
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8c50cb23-9fe2-44a2-afac-e0632b791476n%40googlegroups.com.


Re: Django 3.2rc1: models.W042 is raised on inherited manually specified primary key.

2021-03-26 Thread Caram
I'm now discovering that some INT keys were subrepticely converting to 
BIGINT in the database without me noticing. And there is no BigAutoField in 
any of the migrations.

More worrying, there seem to have been several other unwanted changes:
1. NOT NULL changed to DEFAULT NULL (or the other way round for some 
models). The model has not changed in any way recently however.
2. FOREIGN KEY contraints gone missing. I'm currently going through an old 
mysql backup to get them back.

Cheers,
Caram

Le vendredi 26 mars 2021 à 11:30:44 UTC+1, Mariusz Felisiak a écrit :

> Can you provide a small project to reproduce?
>
> Best,
> Mariusz
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5cc8b42e-cedd-420d-86ee-442e166b81edn%40googlegroups.com.


Re: Django 3.2rc1: models.W042 is raised on inherited manually specified primary key.

2021-03-26 Thread Caram Dache
My bad, I should have read the documentation more thoroughly before.

However, when I set DEFAULT_AUTO_FIELD to BigAutoField and run the
migration, I get errors like the following. This was what troubled me in
the first place:

django.db.utils.IntegrityError: (1452, 'Cannot add or update a child row: a
foreign key constraint fails (`djpat`.`#sql-bb7_1e84`, CONSTRAINT
`myapp_logentry_extension_id_8856aeec_fk` FOREIGN KEY (`extension_id`)
REFERENCES `myapp_extension` (`id`))')

Caram

Le jeu. 25 mars 2021 à 18:07, Mariusz Felisiak 
a écrit :

> Caram, I don't see any issue here. As far as I'm aware you're using the
> auto-created primary key. If you want to get rid of warnings and avoid
> unwanted migrations in the future, set DEFAULT_AUTO_FIELD
> <https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-DEFAULT_AUTO_FIELD>
> to AutoField
> <https://docs.djangoproject.com/en/3.2/ref/models/fields/#django.db.models.AutoField>
> .
>
> See release notes
> <https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys>
> for more details.
>
> #32367 is about inherited PKs, so it's not related with your report.
>
> Best,
> Mariusz
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-developers/bwP-ft6aXdI/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/475b0c2d-14f8-4a1e-8889-87783557cdc2n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/475b0c2d-14f8-4a1e-8889-87783557cdc2n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMApSx2poMnBe_MjS%3D6MCMNhaKi4sDKe-2A-x6jfbrizxSUVPw%40mail.gmail.com.