Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2015-01-18 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:   |  Version:  master
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  dependency generic   | Triage Stage:  Ready for
  contenttypes   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"4df91d05e8ffca15f58d09d9fd0f0ae16891565b"]:
 {{{
 #!CommitTicketReference repository=""
 revision="4df91d05e8ffca15f58d09d9fd0f0ae16891565b"
 [1.7.x] Clarified contrib.contenttypes.generic deprecation; refs #19774.

 Backport of 737cd4ff3decfd3e709885d219e70d8395305965 from stable/1.7.x
 }}}

--
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.e48b75cc85096558791a167602fd4b58%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2015-01-18 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:   |  Version:  master
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  dependency generic   | Triage Stage:  Ready for
  contenttypes   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"737cd4ff3decfd3e709885d219e70d8395305965"]:
 {{{
 #!CommitTicketReference repository=""
 revision="737cd4ff3decfd3e709885d219e70d8395305965"
 [1.8.x] Clarified contrib.contenttypes.generic deprecation; refs #19774.
 }}}

--
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.8f7c9086315f0e0c43338120bd7cc4e3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2015-01-18 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:   |  Version:  master
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  dependency generic   | Triage Stage:  Ready for
  contenttypes   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"3b89d2d540a96ffd33c294b576147ff800b16632"]:
 {{{
 #!CommitTicketReference repository=""
 revision="3b89d2d540a96ffd33c294b576147ff800b16632"
 Removed contrib.contenttypes.generic per deprecation timeline; refs
 #19774.
 }}}

--
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.03bac2f59b4090b984e0ffbdfc527290%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2014-01-26 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:  fixed
  contrib.contenttypes   | Triage Stage:  Ready for
 Severity:  Normal   |  checkin
 Keywords:  dependency generic   |  Needs documentation:  0
  contenttypes   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by Simon Charette ):

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


Comment:

 In [changeset:"10e3faf191d8f230dde8534d1c8fad8c8717816e"]:
 {{{
 #!CommitTicketReference repository=""
 revision="10e3faf191d8f230dde8534d1c8fad8c8717816e"
 Fixed #19774 -- Deprecated the contenttypes.generic module.

 It contained models, forms and admin objects causing undesirable
 import side effects. Refs #16368.

 Thanks to Ramiro, Carl and Loïc for the review.
 }}}

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.645c5b215778af4cf62b6aaec466587f%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2014-01-26 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Ready for
 Severity:  Normal   |  checkin
 Keywords:  dependency generic   |  Needs documentation:  0
  contenttypes   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by ramiro):

 Simon,

 I had some unfinished work in that direction and was a bit uncomfortable
 about still having the formset definition in the new fields module. Good
 call on creating forms.py

 Please go ahead, my review didn't find anything.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.39a341d287bc2376fc99bfa0202bd99a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2014-01-25 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Ready for
 Severity:  Normal   |  checkin
 Keywords:  dependency generic   |  Needs documentation:  0
  contenttypes   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by carljm):

 (I did make a couple comments on wording of docs and error messages.)

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.4ea745b8f093c7e19ca41392f22ecf7a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2014-01-25 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Ready for
 Severity:  Normal   |  checkin
 Keywords:  dependency generic   |  Needs documentation:  0
  contenttypes   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by carljm):

 Looks good to me; good idea to remove everything from that module and just
 deprecate the module, that's a lot simpler than the previous approach.

 I won't claim to have reviewed all the minor changes to docs and tests in
 detail, but I assume if you've run the tests and they are warning-free
 that that was all done correctly. Looks good to me!

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.f243bd8eac35ad5b394087d605bbfe8a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2014-01-25 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Ready for
 Severity:  Normal   |  checkin
 Keywords:  dependency generic   |  Needs documentation:  0
  contenttypes   |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by loic84):

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


Comment:

 Looks good to me, I'm pretty happy with the `forms.py`, `fields.py`,
 `admin.py` split up.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.4e042a077421f8f6b4e047ae30903a39%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2014-01-25 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:  dependency generic   |  Patch needs improvement:  0
  contenttypes   |UI/UX:  0
Has patch:  1|
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by charettes):

 * needs_better_patch:  1 => 0


Comment:

 I adjusted the documentation and added a release note. The PR should be
 ready for review.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.aec5f16b8b1cdb20a9b578f9fa4c8012%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2014-01-21 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  1
 Keywords:  dependency generic   |  Patch needs improvement:  1
  contenttypes   |UI/UX:  0
Has patch:  1|
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by charettes):

 * needs_better_patch:  0 => 1
 * has_patch:  0 => 1
 * needs_docs:  0 => 1


Comment:

 @ramiro, I created a PR missing release notes and documentation
 adjustment. I'll try to work on it in the new few days but if you want to
 pick it up from here feel free to do it.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.db68636a225db940842bbde03eecffe9%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2014-01-20 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:  dependency generic   |  Patch needs improvement:  0
  contenttypes   |UI/UX:  0
Has patch:  0|
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by charettes):

 * cc: charettes (added)


-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.51db8969c0c81dec1d5610666d2258dd%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2014-01-20 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:  dependency generic   |  Patch needs improvement:  0
  contenttypes   |UI/UX:  0
Has patch:  0|
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by charettes):

 As discussed on IRC with ramiro and loic splitting the `generic` module
 into `fields` and `admin` and deprecating the former should fix the issue.

 I couldn't reproduce the `Site` cloaking with you described example
 against 1.6 and master. The only way I managed to reproduce is by having a
 `sites` app, just like it's described in #16368.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.46802796c281f23e2804b8fbab13315e%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2014-01-20 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:  dependency generic   |  Patch needs improvement:  0
  contenttypes   |UI/UX:  0
Has patch:  0|
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by loic84):

 * cc: loic@… (added)


-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.2cff38827195a0b0c5150ed3caab609a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2013-03-28 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  ramiro
 Type:   |   Status:  assigned
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:  dependency generic   |  Patch needs improvement:  0
  contenttypes   |UI/UX:  0
Has patch:  0|
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by ramiro):

 * owner:  nobody => ramiro
 * status:  new => assigned


Old description:

> (Copied from https://code.djangoproject.com/ticket/16368#comment:16)
>
> The django/contrib/contenttypes/generic.py modules contains both the
> definitions of the model-related generic stuff (!GenericForeignKey, etc.)
> AND the admin app-related specialized inlines (!GenericInlineModelAdmin,
> !GenericStackedInline, !GenericTabularInline.)
>
> So, for example, if you import `django.contrib.contenttypes.generic` from
> your models.py because you need !GenericForeignKey then the
> !GenericXInlineY sutff imports django.contrib.admin and it in its own
> turn imports contrib.sites causing the reported failure (see below).
> Again, the Sites framework isn't listed in INSTALLED_APPS and what is
> worse: The admin app isn't either (!).
>
> Maybe it's time we move !GenericInlineModelAdmin, !GenericStackedInline,
> !GenericTabularInline from django.contrib.contenttypes.generic to, say,
> django.contrib.contenttypes.generic_admin? (of course this would need a
> deprecation process)
>
> {{{
> from django.contrib.contenttypes import generic
>   File "django/contrib/contenttypes/generic.py", line 14, in 
> from django.contrib.admin.options import InlineModelAdmin,
> flatten_fieldsets
>   File "django/contrib/admin/__init__.py", line 6, in 
> from django.contrib.admin.sites import AdminSite, site
>   File "django/contrib/admin/sites.py", line 4, in 
> from django.contrib.admin.forms import AdminAuthenticationForm
>   File "django/contrib/admin/forms.py", line 4, in 
> from django.contrib.auth.forms import AuthenticationForm
>   File "django/contrib/auth/forms.py", line 10, in 
> from django.contrib.sites.models import get_current_site
>   File "/django/contrib/sites/models.py", line 5, in 
> raise Exception
> }}}

New description:

 (Copied and adapted from
 https://code.djangoproject.com/ticket/16368#comment:16)

 Consider a project with a `foo` and a `bar` apps listed on
 `INSTALLED_APPS`:
 * `foo` uses generic foreign keys, with the following `models.py`:
 {{{
 from django.db import models
 from django.contrib.contenttypes.models import ContentType
 from django.contrib.contenttypes import generic

 class TaggedItem(models.Model):
 tag = models.SlugField()
 content_type = models.ForeignKey(ContentType)
 object_id = models.PositiveIntegerField()
 content_object = generic.GenericForeignKey()
 }}}

 * `bar` has a `Site` model:
 {{{
 from django.db import models

 class Site(models.Model):
 name = models.CharField(...
 # ...
 }}}
 * Neither the admin nor sites Django apps are being used.

 This causes the user's Site model to be overridden and masked by Django
 sites framework's one.

 This is because the `django/contrib/contenttypes/generic.py` module
 contain both the definitions of the model-related generic stuff
 (!GenericForeignKey, etc.) AND the admin app-related specialized inlines
 (!GenericInlineModelAdmin, !GenericStackedInline, !GenericTabularInline.)

 Maybe it's time we move the latter ones from
 `django.contrib.contenttypes.generic` to, say, a new `generic_admin` (or
 `admin_tools`?) on `django.contrib.contenttypes`?. Of course this would
 need a deprecation process.

--

-- 
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 post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19774: contentypes generic module has core functionality plus admins-specific one

2013-02-08 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
-+-
 Reporter:  ramiro   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  master
Component:   |   Resolution:
  contrib.contenttypes   | Triage Stage:  Accepted
 Severity:  Normal   |  Needs documentation:  0
 Keywords:  dependency generic   |  Patch needs improvement:  0
  contenttypes   |UI/UX:  0
Has patch:  0|
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by wim@…):

 * keywords:   => dependency generic contenttypes
 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


-- 
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 post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Django] #19774: contentypes generic module has core functionality plus admins-specific one

2013-02-07 Thread Django
#19774: contentypes generic module has core functionality plus admins-specific 
one
+
   Reporter:  ramiro|  Owner:  nobody
   Type:  Bug   | Status:  new
  Component:  contrib.contenttypes  |Version:  master
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 (Copied from https://code.djangoproject.com/ticket/16368#comment:16)

 The django/contrib/contenttypes/generic.py modules contains both the
 definitions of the model-related generic stuff (!GenericForeignKey, etc.)
 AND the admin app-related specialized inlines (!GenericInlineModelAdmin,
 !GenericStackedInline, !GenericTabularInline.)

 So, for example, if you import `django.contrib.contenttypes.generic` from
 your models.py because you need !GenericForeignKey then the
 !GenericXInlineY sutff imports django.contrib.admin and it in its own turn
 imports contrib.sites causing the reported failure (see below). Again, the
 Sites framework isn't listed in INSTALLED_APPS and what is worse: The
 admin app isn't either (!).

 Maybe it's time we move !GenericInlineModelAdmin, !GenericStackedInline,
 !GenericTabularInline from django.contrib.contenttypes.generic to, say,
 django.contrib.contenttypes.generic_admin? (of course this would need a
 deprecation process)

 {{{
 from django.contrib.contenttypes import generic
   File "django/contrib/contenttypes/generic.py", line 14, in 
 from django.contrib.admin.options import InlineModelAdmin,
 flatten_fieldsets
   File "django/contrib/admin/__init__.py", line 6, in 
 from django.contrib.admin.sites import AdminSite, site
   File "django/contrib/admin/sites.py", line 4, in 
 from django.contrib.admin.forms import AdminAuthenticationForm
   File "django/contrib/admin/forms.py", line 4, in 
 from django.contrib.auth.forms import AuthenticationForm
   File "django/contrib/auth/forms.py", line 10, in 
 from django.contrib.sites.models import get_current_site
   File "/django/contrib/sites/models.py", line 5, in 
 raise Exception
 }}}

-- 
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 post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.