Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-09-02 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  Taulant
 |  Aliraj
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  proxy,   | Triage Stage:  Ready for
  InlineModelAdmin, E202 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"0e8be73812a6e62d5a6b12a585d133b56bc2bf52" 0e8be738]:
 {{{
 #!CommitTicketReference repository=""
 revision="0e8be73812a6e62d5a6b12a585d133b56bc2bf52"
 Fixed #32975 -- Fixed admin system check for inlines with foreign keys to
 proxy models.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.e0e6f46bb0bb492ca949399f2e89d6ee%40djangoproject.com.


Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-09-02 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  Taulant
 |  Aliraj
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  proxy,   | Triage Stage:  Ready for
  InlineModelAdmin, E202 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.edf1e5b63e455b3e393b2afa4411e93e%40djangoproject.com.


Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-09-02 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  Taulant
 |  Aliraj
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  proxy,   | Triage Stage:  Accepted
  InlineModelAdmin, E202 |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.88349c10caae4edc9ed0025c9533ff85%40djangoproject.com.


Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-08-30 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  Taulant
 |  Aliraj
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  proxy,   | Triage Stage:  Accepted
  InlineModelAdmin, E202 |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Taulant Aliraj):

 * has_patch:  0 => 1


Comment:

 Opened a PR for this: https://github.com/django/django/pull/14812

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.2d9a262a2eb05fd6e966b975f74fb702%40djangoproject.com.


Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-08-22 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  Taulant
 |  Aliraj
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  proxy,   | Triage Stage:  Accepted
  InlineModelAdmin, E202 |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Taulant Aliraj):

 * owner:  (none) => Taulant Aliraj
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.7b1b2226ba854ced8d4e4fba564bcee1%40djangoproject.com.


Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-08-14 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  proxy,   | Triage Stage:  Accepted
  InlineModelAdmin, E202 |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Bal Krishna Jha):

 * owner:  Bal Krishna Jha => (none)
 * status:  assigned => new


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.4ebbab33825d5d6a39536b099ff1cdee%40djangoproject.com.


Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-08-02 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  Bal
 |  Krishna Jha
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  proxy,   | Triage Stage:  Accepted
  InlineModelAdmin, E202 |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Bal Krishna Jha):

 * owner:  nobody => Bal Krishna Jha
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.0e72165826ac6013784daf91dd2c1a8b%40djangoproject.com.


Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-08-01 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  proxy,   | Triage Stage:  Accepted
  InlineModelAdmin, E202 |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.03521bb1fb592d6860b35df314305de7%40djangoproject.com.


Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-07-30 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  proxy,   | Triage Stage:
  InlineModelAdmin, E202 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Lucas Weyne:

Old description:

> This is similar to #30273, but in this case, the `InlineModelAdmin.model`
> is a model with references to a proxy superclass
>
> Assume the following Django models:
>
> {{{#!python
>
> class Reporter(models.Model):
> name = models.CharField(max_length=50)
>

> class Journalist(Reporter):
>
> class Meta:
> proxy = True
>

> class SpecialJournalist(Journalist):
>
> class Meta:
> proxy = True
>

> class Article(models.Model):
> journalist = models.ForeignKey(Journalist, on_delete=models.CASCADE)
> }}}
>

> Register model admins as follows (exemplary):
>

> {{{#!python
>
> class ArticleInline(admin.TabularInline):
> model = Article
> fk_name = 'reporter'
>

> @admin.register(SpecialJournalist)
> class SpecialJournalistAdmin(admin.ModelAdmin):
> inlines = [ArticleInline]
>
> }}}
>

> This will result in the following error:
> {{{
> : (admin.E202) fk_name 'journalist' is not a
> ForeignKey to 'SpecialJournalist'.
> }}}
>
> This problem occurs on this check this check:
> https://github.com/django/django/blob/3.1.13/django/forms/models.py#L1006
>
> A `ValueError` is raised because the result for
> `SpecialJournalist._meta.get_parent_list()` does not include
> `Journalist`:
>
> {{{
> >>> SpecialJournalist._meta.get_parent_list()
> []
> }}}

New description:

 This is similar to #30273, but in this case, the `InlineModelAdmin.model`
 is a model with references to a proxy superclass

 Assume the following Django models:

 {{{#!python

 class Reporter(models.Model):
 name = models.CharField(max_length=50)


 class Journalist(Reporter):

 class Meta:
 proxy = True


 class SpecialJournalist(Journalist):

 class Meta:
 proxy = True


 class Article(models.Model):
 journalist = models.ForeignKey(Journalist, on_delete=models.CASCADE)
 }}}


 Register model admins as follows (exemplary):


 {{{#!python

 class ArticleInline(admin.TabularInline):
 model = Article
 fk_name = 'journalist'


 @admin.register(SpecialJournalist)
 class SpecialJournalistAdmin(admin.ModelAdmin):
 inlines = [ArticleInline]

 }}}


 This will result in the following error:
 {{{
 : (admin.E202) fk_name 'journalist' is not a
 ForeignKey to 'SpecialJournalist'.
 }}}

 This problem occurs on this check this check:
 https://github.com/django/django/blob/3.1.13/django/forms/models.py#L1006

 A `ValueError` is raised because the result for
 `SpecialJournalist._meta.get_parent_list()` does not include `Journalist`:

 {{{
 >>> SpecialJournalist._meta.get_parent_list()
 []
 }}}

--

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.71a530f25a15e81302bca21ec775ec31%40djangoproject.com.


Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-07-30 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  proxy,   | Triage Stage:
  InlineModelAdmin, E202 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Lucas Weyne:

Old description:

> This is similar to #30273, but in this case, the `InlineModelAdmin.model`
> is a model with references to a proxy superclass
>
> Assume the following Django models:
>
> {{{#!python
>
> class Reporter(models.Model):
> name = models.CharField(max_length=50)
>

> class Journalist(Reporter):
>
> class Meta:
> proxy = True
>

> class SpecialJournalist(Journalist):
>
> class Meta:
> proxy = True
>

> class Article(models.Model):
> journalist = models.ForeignKey(Journalist, on_delete=models.CASCADE)
> }}}
>

> Register model admins as follows (exemplary):
>

> {{{#!python
>
> class ArticleInline(admin.TabularInline):
> model = Article
> fk_name = 'reporter'
>

> @admin.register(SpecialJournalist)
> class SpecialJournalistAdmin(admin.ModelAdmin):
> inlines = [ArticleInline]
>
> }}}
>

> This will result in the following error:
> {{{
> : (admin.E202) fk_name 'journalist' is not a
> ForeignKey to 'SpecialJournalist'.
> }}}
>
> This problem occurs on this check this check:
> https://github.com/django/django/blob/3.1.13/django/forms/models.py#L1006
>
> A `ValueError` is raised because the result for
> `SpecialJournalist._meta.get_parent_list()` does not include
> `Journalist`:
>
> {{{#!python
> >>> SpecialJournalist._meta.get_parent_list()
> []
> }}}

New description:

 This is similar to #30273, but in this case, the `InlineModelAdmin.model`
 is a model with references to a proxy superclass

 Assume the following Django models:

 {{{#!python

 class Reporter(models.Model):
 name = models.CharField(max_length=50)


 class Journalist(Reporter):

 class Meta:
 proxy = True


 class SpecialJournalist(Journalist):

 class Meta:
 proxy = True


 class Article(models.Model):
 journalist = models.ForeignKey(Journalist, on_delete=models.CASCADE)
 }}}


 Register model admins as follows (exemplary):


 {{{#!python

 class ArticleInline(admin.TabularInline):
 model = Article
 fk_name = 'reporter'


 @admin.register(SpecialJournalist)
 class SpecialJournalistAdmin(admin.ModelAdmin):
 inlines = [ArticleInline]

 }}}


 This will result in the following error:
 {{{
 : (admin.E202) fk_name 'journalist' is not a
 ForeignKey to 'SpecialJournalist'.
 }}}

 This problem occurs on this check this check:
 https://github.com/django/django/blob/3.1.13/django/forms/models.py#L1006

 A `ValueError` is raised because the result for
 `SpecialJournalist._meta.get_parent_list()` does not include `Journalist`:

 {{{
 >>> SpecialJournalist._meta.get_parent_list()
 []
 }}}

--

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.d713365b5c900d63bf4d9a4c54d40dc9%40djangoproject.com.


Re: [Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-07-30 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
 Reporter:  Lucas Weyne  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  proxy,   | Triage Stage:
  InlineModelAdmin, E202 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Lucas Weyne):

 * Attachment "test30273-modified.zip" added.

 Test project to see this error

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.5b927a8d7554dfc07c88ce4fd4552127%40djangoproject.com.


[Django] #32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass reference results in admin.E202

2021-07-30 Thread Django
#32975: ModelAdmin for proxy model with InlineModelAdmin for proxy superclass
reference results in admin.E202
-+-
   Reporter:  Lucas  |  Owner:  nobody
  Weyne  |
   Type:  Bug| Status:  new
  Component: |Version:  3.1
  contrib.admin  |   Keywords:  proxy,
   Severity:  Normal |  InlineModelAdmin, E202
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 This is similar to #30273, but in this case, the `InlineModelAdmin.model`
 is a model with references to a proxy superclass

 Assume the following Django models:

 {{{#!python

 class Reporter(models.Model):
 name = models.CharField(max_length=50)


 class Journalist(Reporter):

 class Meta:
 proxy = True


 class SpecialJournalist(Journalist):

 class Meta:
 proxy = True


 class Article(models.Model):
 journalist = models.ForeignKey(Journalist, on_delete=models.CASCADE)
 }}}


 Register model admins as follows (exemplary):


 {{{#!python

 class ArticleInline(admin.TabularInline):
 model = Article
 fk_name = 'reporter'


 @admin.register(SpecialJournalist)
 class SpecialJournalistAdmin(admin.ModelAdmin):
 inlines = [ArticleInline]

 }}}


 This will result in the following error:
 {{{
 : (admin.E202) fk_name 'journalist' is not a
 ForeignKey to 'SpecialJournalist'.
 }}}

 This problem occurs on this check this check:
 https://github.com/django/django/blob/3.1.13/django/forms/models.py#L1006

 A `ValueError` is raised because the result for
 `SpecialJournalist._meta.get_parent_list()` does not include `Journalist`:

 {{{#!python
 >>> SpecialJournalist._meta.get_parent_list()
 []
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.fa8887bf66871234bdcd0398178a595e%40djangoproject.com.