Re: [Django] #22986: Allow disabling session model database table creation if not used by session engine

2016-08-28 Thread Django
#22986: Allow disabling session model database table creation if not used by
session engine
--+--
 Reporter:  timo  |Owner:  nobody
 Type:  New feature   |   Status:  closed
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:  worksforme
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  1 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by aaugustin):

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


Comment:

 Since Django 1.7 we have a clean way to prevent the creation of database
 tables, which is the crux of the issue here:

 {{{
 MIGRATION_MODULES = {
 'sessions': None
 }
 }}}

 On one hand, it's a slightly convoluted way to declare that you aren't
 using the Session model. On the other hand, it's a reasonable way to tell
 Django not to run migrations that create the table backing the Session
 model.

--
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/062.b38f08f00440a2fea9d6a6e764701cc0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22986: Allow disabling session model database table creation if not used by session engine

2014-07-25 Thread Django
#22986: Allow disabling session model database table creation if not used by
session engine
--+
 Reporter:  timo  |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  1 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by cjerdonek):

 I haven't looked into the history of this, but it seems like one of the
 issues is that `INSTALLED_APPS` is currently being used for two different
 but related purposes: 1) to say which apps are being used, and 2) to say
 what models need to be added to the schema.  I wonder what would be the
 best way to make this distinction.

-- 
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/062.532cfbe16ec2622a806e74f941d845a4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22986: Allow disabling session model database table creation if not used by session engine

2014-07-25 Thread Django
#22986: Allow disabling session model database table creation if not used by
session engine
--+
 Reporter:  timo  |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  1 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by slurms):

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


Comment:

 I was going to tackle this, and thought that maybe we could abuse
 `_meta.swappable`, but it appears that `ModelBase._check_swappable`
 actually checks that the swappable model exists.

 I wonder if this would be a use-case for the app registry to allow
 unregistering models? Then in the session app config's `ready()` we could
 conditionally unregister the `Session` model if the session engine doesn't
 require it.

 My approach was to override `AppConfig.get_model` and
 `AppConfig.get_models` as a way to "disable" the session model.
 Unfortunately this doesn't work for migrations.

 PR here: https://github.com/django/django/pull/2960

-- 
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/062.ad0d8084b73af92dff15d5367af70865%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22986: Allow disabling session model database table creation if not used by session engine

2014-07-09 Thread Django
#22986: Allow disabling session model database table creation if not used by
session engine
--+
 Reporter:  timo  |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| 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 ):

 In [changeset:"a3d710a38f1fab5e092cef7a17826674a00e70ea"]:
 {{{
 #!CommitTicketReference repository=""
 revision="a3d710a38f1fab5e092cef7a17826674a00e70ea"
 [1.7.x] Revert "Improve cookie based session backend docs." refs #20418

 This reverts commit d9c01da1f8ba3d4e0947fd1d619c8f4a9b013360.

 This is poor advice as it breaks the test client login (refs #22934).
 We can add a note like this back after refs #22986 is resolved.

 Backport of 3a85aae2ea from master
 }}}

-- 
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/062.fd9949146d2b281923fea9b2c209aff5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22986: Allow disabling session model database table creation if not used by session engine

2014-07-09 Thread Django
#22986: Allow disabling session model database table creation if not used by
session engine
--+
 Reporter:  timo  |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| 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 ):

 In [changeset:"f3bdb83ba58a696c0696d8a6706d2c44a00da68a"]:
 {{{
 #!CommitTicketReference repository=""
 revision="f3bdb83ba58a696c0696d8a6706d2c44a00da68a"
 [1.6.x] Revert "Improve cookie based session backend docs." refs #20418

 This reverts commit d9c01da1f8ba3d4e0947fd1d619c8f4a9b013360.

 This is poor advice as it breaks the test client login (refs #22934).
 We can add a note like this back after refs #22986 is resolved.

 Backport of 3a85aae2ea from master
 }}}

-- 
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/062.2f24d707ff0306a9b845cf03115f2540%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22986: Allow disabling session model database table creation if not used by session engine

2014-07-09 Thread Django
#22986: Allow disabling session model database table creation if not used by
session engine
--+
 Reporter:  timo  |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by cjerdonek):

 * cc: chris.jerdonek@… (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/062.258bba675ab43c885274dc35efb29532%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22986: Allow disabling session model database table creation if not used by session engine

2014-07-09 Thread Django
#22986: Allow disabling session model database table creation if not used by
session engine
--+
 Reporter:  timo  |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| 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 ):

 In [changeset:"3a85aae2eacae836e2a92de77615569883b81932"]:
 {{{
 #!CommitTicketReference repository=""
 revision="3a85aae2eacae836e2a92de77615569883b81932"
 Revert "Improve cookie based session backend docs." refs #20418

 This reverts commit d9c01da1f8ba3d4e0947fd1d619c8f4a9b013360.

 This is poor advice as it breaks the test client login (refs #22934).
 We can add a note like this back after refs #22986 is resolved.
 }}}

-- 
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/062.057349a93c8c6e7d4cb0e90ddf9f75d3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #22986: Allow disabling session model database table creation if not used by session engine

2014-07-09 Thread Django
#22986: Allow disabling session model database table creation if not used by
session engine
+
   Reporter:  timo  |  Owner:  nobody
   Type:  New feature   | Status:  new
  Component:  contrib.sessions  |Version:  master
   Severity:  Normal|   Keywords:
   Triage Stage:  Accepted  |  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 Previously, we recommended removing `contrib.sessions` from
 `INSTALLED_APPS` but this causes the test client login to break (#22934)
 and also disables the `clearsessions` management command which could be
 useful for the file-based sessions (which also don't require the database
 tables).

-- 
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/047.e1841034577b35037a0464981b2079fb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.