[Django] #28757: Using forms of contrib.auth without installing contrib.auth

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #28757: Using forms of contrib.auth without installing contrib.auth

Django
#28757: Using forms of contrib.auth without installing contrib.auth
-----------------------------------------+---------------------------------
               Reporter:  Sagar Chalise  |          Owner:  nobody
                   Type:  New feature    |         Status:  new
              Component:  contrib.auth   |        Version:  1.11
               Severity:  Normal         |       Keywords:  auth forms apps
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+---------------------------------
 It seems the forms available in contrib.auth app cannot be used without
 using contrib.auth in settings.INSTALLED_APPS.
 May be break some of reusable feature of forms into base_forms.py just
 like AbstractBaseUser model.

--
Ticket URL: <https://code.djangoproject.com/ticket/28757>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/055.20eb018b15ecf650f7040b4ee1fa0fd6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Using forms of contrib.auth without installing contrib.auth

Django
#28757: Using forms of contrib.auth without installing contrib.auth
---------------------------------+--------------------------------------
     Reporter:  Sagar Chalise    |                    Owner:  nobody
         Type:  New feature      |                   Status:  new
    Component:  contrib.auth     |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:  auth forms apps  |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Tim Graham):

 Which forms are you trying to use and what error do you get?

--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:1>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.498fbce30e5c76274a50719aa244c341%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Using forms of contrib.auth without installing contrib.auth

Django
In reply to this post by Django
#28757: Using forms of contrib.auth without installing contrib.auth
---------------------------------+--------------------------------------
     Reporter:  Sagar Chalise    |                    Owner:  nobody
         Type:  New feature      |                   Status:  new
    Component:  contrib.auth     |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:  auth forms apps  |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Sagar Chalise):

 Basically, I am using custom user model which avoids both groups and
 permissions. I could easily use Authentication as well as Password related
 forms but seems the forms.py directly imports User from
 contrib.auth.models
 https://github.com/django/django/blob/master/django/contrib/auth/forms.py#L10.
 Which seems to enforce me to install contrib.auth package.

--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:2>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.f5313b589e8afa07c0c926525df965f6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Allow using forms of contrib.auth without installing contrib.auth (was: Using forms of contrib.auth without installing contrib.auth)

Django
In reply to this post by Django
#28757: Allow using forms of contrib.auth without installing contrib.auth
--------------------------------------+------------------------------------
     Reporter:  Sagar Chalise         |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  contrib.auth          |                  Version:  1.11
     Severity:  Normal                |               Resolution:
     Keywords:  auth forms apps       |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

 * stage:  Unreviewed => Accepted
 * type:  New feature => Cleanup/optimization


Comment:

 I wonder if moving that import inside the form class where it's used would
 be feasible and solve the issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:3>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.597a0942ca4672f61ef86fc3a51c380e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Allow using forms of contrib.auth without installing contrib.auth

Django
In reply to this post by Django
#28757: Allow using forms of contrib.auth without installing contrib.auth
-------------------------------------+-------------------------------------
     Reporter:  Sagar Chalise        |                    Owner:  hui shang
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  contrib.auth         |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:  auth forms apps      |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by hui shang):

 * owner:  nobody => hui shang
 * status:  new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:4>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.3b63b9ddc3c493e83daf53967959d5e6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Allow using forms of contrib.auth without installing contrib.auth

Django
In reply to this post by Django
#28757: Allow using forms of contrib.auth without installing contrib.auth
-------------------------------------+-------------------------------------
     Reporter:  Sagar Chalise        |                    Owner:  hui shang
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  contrib.auth         |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:  auth forms apps      |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by hui shang):

 * has_patch:  0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:5>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.e5d737aa108bbd6564c6a99d71dfe179%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Allow using forms of contrib.auth without installing contrib.auth

Django
In reply to this post by Django
#28757: Allow using forms of contrib.auth without installing contrib.auth
-------------------------------------+-------------------------------------
     Reporter:  Sagar Chalise        |                    Owner:
         Type:                       |  shangdahao
  Cleanup/optimization               |                   Status:  closed
    Component:  contrib.auth         |                  Version:  1.11
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  auth forms apps      |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

 In [changeset:"3333d935d2914cd80cf31f4803821ad5c0e2a51d" 3333d93]:
 {{{
 #!CommitTicketReference repository=""
 revision="3333d935d2914cd80cf31f4803821ad5c0e2a51d"
 Fixed #28757 -- Allowed using contrib.auth forms without installing
 contrib.auth.

 Also fixed #28608 -- Allowed UserCreationForm and UserChangeForm to
 work with custom user models.

 Thanks Sagar Chalise and Rômulo Collopy for reports, and Tim Graham
 and Tim Martin for reviews.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:6>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.1ef329cdf5b4808d20e10b17f205e93e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Allow using forms of contrib.auth without installing contrib.auth

Django
In reply to this post by Django
#28757: Allow using forms of contrib.auth without installing contrib.auth
-------------------------------------+-------------------------------------
     Reporter:  Sagar Chalise        |                    Owner:
         Type:                       |  shangdahao
  Cleanup/optimization               |                   Status:  new
    Component:  contrib.auth         |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:  auth forms apps      |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * status:  closed => new
 * has_patch:  1 => 0
 * resolution:  fixed =>


Comment:

 After this commit, there are some errors when running `$
 ./tests/runtests.py auth_tests.test_management` (but adding `--reverse`
 fixes it). shangdahao, can you debug that?

--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:7>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.61383391f2db735eb9b00d8f8da91f6c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Allow using forms of contrib.auth without installing contrib.auth

Django
In reply to this post by Django
#28757: Allow using forms of contrib.auth without installing contrib.auth
-------------------------------------+-------------------------------------
     Reporter:  Sagar Chalise        |                    Owner:
         Type:                       |  shangdahao
  Cleanup/optimization               |                   Status:  new
    Component:  contrib.auth         |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:  auth forms apps      |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

 I tried to solve the issue by putting the reload of
 `django.contrib.auth.forms` in `django.test.signals.user_model_swapped()`
 rather than limiting it to the Django tests. I couldn't get it to work.

 The issue is solved by adding `import django.contrib.auth.forms` to the
 top of `auth_tests/test_management.py` but I don't know why that works.

--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:8>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.d18e418ad31d92781917379f2f3381a8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Allow using forms of contrib.auth without installing contrib.auth

Django
In reply to this post by Django
#28757: Allow using forms of contrib.auth without installing contrib.auth
-------------------------------------+-------------------------------------
     Reporter:  Sagar Chalise        |                    Owner:
         Type:                       |  shangdahao
  Cleanup/optimization               |                   Status:  new
    Component:  contrib.auth         |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:  auth forms apps      |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Sławek Ehlert):

 Tim, I think the commit from this ticket doesn't properly support all the
 cases of custom user models (i.e. it assumes that the username field
 should be a subclass of CharField). I've opened #29449 for that. Also
 there's something weird going on with running the tests (details are in
 the ticket).

--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:9>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.1de282e35f7fde27314e2f1c5430dc02%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Allow using forms of contrib.auth without installing contrib.auth

Django
In reply to this post by Django
#28757: Allow using forms of contrib.auth without installing contrib.auth
-------------------------------------+-------------------------------------
     Reporter:  Sagar Chalise        |                    Owner:
         Type:                       |  shangdahao
  Cleanup/optimization               |                   Status:  closed
    Component:  contrib.auth         |                  Version:  1.11
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  auth forms apps      |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

 In [changeset:"f3fa86a89b3b85242f49b2b9acf58b5ea35acc1f" f3fa86a]:
 {{{
 #!CommitTicketReference repository=""
 revision="f3fa86a89b3b85242f49b2b9acf58b5ea35acc1f"
 Fixed #29449 -- Reverted "Fixed #28757 -- Allowed using contrib.auth forms
 without installing contrib.auth."

 This reverts commit 3333d935d2914cd80cf31f4803821ad5c0e2a51d due to
 a crash if USERNAME_FIELD isn't a CharField.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:10>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.dc188ddf61427965fe658e07d4d27f7a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Allow using forms of contrib.auth without installing contrib.auth

Django
In reply to this post by Django
#28757: Allow using forms of contrib.auth without installing contrib.auth
-------------------------------------+-------------------------------------
     Reporter:  Sagar Chalise        |                    Owner:
         Type:                       |  shangdahao
  Cleanup/optimization               |                   Status:  closed
    Component:  contrib.auth         |                  Version:  1.11
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  auth forms apps      |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

 In [changeset:"78f502cd0bc834422c3f189e852564fe4b6459f2" 78f502c]:
 {{{
 #!CommitTicketReference repository=""
 revision="78f502cd0bc834422c3f189e852564fe4b6459f2"
 [2.1.x] Fixed #29449 -- Reverted "Fixed #28757 -- Allowed using
 contrib.auth forms without installing contrib.auth."

 This reverts commit 3333d935d2914cd80cf31f4803821ad5c0e2a51d due to
 a crash if USERNAME_FIELD isn't a CharField.

 Backport of f3fa86a89b3b85242f49b2b9acf58b5ea35acc1f from master
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:11>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.46aea84c6ae67ce1bdd40f66f847f5e1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28757: Allow using forms of contrib.auth without installing contrib.auth

Django
In reply to this post by Django
#28757: Allow using forms of contrib.auth without installing contrib.auth
-------------------------------------+-------------------------------------
     Reporter:  Sagar Chalise        |                    Owner:
         Type:                       |  shangdahao
  Cleanup/optimization               |                   Status:  new
    Component:  contrib.auth         |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:  auth forms apps      |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

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


Comment:

 I reverted the original patch due to the regression described in #29449.
 Unit tests for those cases are provided in
 [https://github.com/django/django/pull/10020 PR 10020] which can be
 included in the patch for this ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/28757#comment:12>
Django <https://code.djangoproject.com/>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.50d16c0d9ca6aba25d09ad376c21f618%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.