Re: [Django] #34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.

2022-11-29 Thread Django
#34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.
-+-
 Reporter:  Martin Lehoux|Owner:  Martin
 |  Lehoux
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Release blocker  |   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 Mariusz Felisiak ):

 In [changeset:"58156f4ed761b9f7650d5e7a12f3f20be3d60c53" 58156f4e]:
 {{{
 #!CommitTicketReference repository=""
 revision="58156f4ed761b9f7650d5e7a12f3f20be3d60c53"
 [4.1.x] Refs #33397, Refs #34160 -- Added release note for resolving
 output_field changes.

 Backport of e8dcef155c1848ef49e54f787a7d20faf3bf9296 from main
 }}}

-- 
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/01070184c76abc35-6db03c4f-295f-46c7-a26b-83128dd49d8f-00%40eu-central-1.amazonses.com.


Re: [Django] #34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.

2022-11-29 Thread Django
#34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.
-+-
 Reporter:  Martin Lehoux|Owner:  Martin
 |  Lehoux
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  assigned => closed
 * resolution:   => wontfix
 * stage:  Accepted => Unreviewed


-- 
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/01070184c76bdde8-bd15d96e-1d44-498a-b388-671b1b891fbb-00%40eu-central-1.amazonses.com.


Re: [Django] #33397: Arithmetic operations on DateField/DateTimeField/DurationField expressions are buggy.

2022-11-29 Thread Django
#33397: Arithmetic operations on DateField/DateTimeField/DurationField 
expressions
are buggy.
-+-
 Reporter:  Luke Plant   |Owner:  Luke
 |  Plant
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"58156f4ed761b9f7650d5e7a12f3f20be3d60c53" 58156f4e]:
 {{{
 #!CommitTicketReference repository=""
 revision="58156f4ed761b9f7650d5e7a12f3f20be3d60c53"
 [4.1.x] Refs #33397, Refs #34160 -- Added release note for resolving
 output_field changes.

 Backport of e8dcef155c1848ef49e54f787a7d20faf3bf9296 from main
 }}}

-- 
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/01070184c76abc76-dde69e7d-1d14-4743-acd3-33943d4c3423-00%40eu-central-1.amazonses.com.


Re: [Django] #33397: Arithmetic operations on DateField/DateTimeField/DurationField expressions are buggy.

2022-11-29 Thread Django
#33397: Arithmetic operations on DateField/DateTimeField/DurationField 
expressions
are buggy.
-+-
 Reporter:  Luke Plant   |Owner:  Luke
 |  Plant
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by GitHub ):

 In [changeset:"e8dcef155c1848ef49e54f787a7d20faf3bf9296" e8dcef15]:
 {{{
 #!CommitTicketReference repository=""
 revision="e8dcef155c1848ef49e54f787a7d20faf3bf9296"
 Refs #33397, Refs #34160 -- Added release note for resolving output_field
 changes.
 }}}

-- 
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/01070184c76a3dc9-1bfcce0e-b64c-4863-9ee1-c17ef6a000f8-00%40eu-central-1.amazonses.com.


Re: [Django] #34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.

2022-11-29 Thread Django
#34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.
-+-
 Reporter:  Martin Lehoux|Owner:  Martin
 |  Lehoux
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Release blocker  |   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 GitHub ):

 In [changeset:"e8dcef155c1848ef49e54f787a7d20faf3bf9296" e8dcef15]:
 {{{
 #!CommitTicketReference repository=""
 revision="e8dcef155c1848ef49e54f787a7d20faf3bf9296"
 Refs #33397, Refs #34160 -- Added release note for resolving output_field
 changes.
 }}}

-- 
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/01070184c76a3d8d-1e875a43-f5e0-445f-9720-08c044eb330f-00%40eu-central-1.amazonses.com.


Re: [Django] #10929: Support a default value for Sum (and possibly other aggregation functions)

2022-11-29 Thread Django
#10929: Support a default value for Sum (and possibly other aggregation 
functions)
-+-
 Reporter:  nolan|Owner:  Nick Pope
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  aggregate annotate   | Triage Stage:  Ready for
  default|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"0db8bf3d60f7a027391ce89555bdb4a95ad0a227" 0db8bf3d]:
 {{{
 #!CommitTicketReference repository=""
 revision="0db8bf3d60f7a027391ce89555bdb4a95ad0a227"
 Refs #10929 -- Fixed aggregates crash when passing strings as defaults.

 Previously strings were interpreted as F() expressions and default
 crashed with AttributeError:
 'F' object has no attribute 'empty_result_set_value'
 }}}

-- 
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/01070184c75f226d-89022047-d483-4667-a1a8-bab4229e942d-00%40eu-central-1.amazonses.com.


Re: [Django] #34190: Add a dump and die function to Django

2022-11-29 Thread Django
#34190: Add a dump and die function to Django
-+-
 Reporter:  lucianboboc  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Utilities|  Version:  4.1
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  feature request, | Triage Stage:
  development|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


Comment:

 Thanks for this ticket, however it's not something that needs to be built
 into Django itself. 3rd party package seems to be the best place for such
 a feature.

 You can raise the idea on the DevelopersMailingList to reach a wider
 audience and see what other think. Please
 [https://docs.djangoproject.com/en/stable/internals/contributing/triaging-
 tickets/#closing-tickets follow the triaging guidelines with regards to
 wontfix tickets].

-- 
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/01070184c51fc73e-01684393-0273-4a81-8199-8eed54fa2698-00%40eu-central-1.amazonses.com.


[Django] #34190: Add a dump and die function to Django

2022-11-29 Thread Django
#34190: Add a dump and die function to Django
-+-
   Reporter: |  Owner:  nobody
  lucianboboc|
   Type:  New| Status:  new
  feature|
  Component:  Utilities  |Version:  4.1
   Severity:  Normal |   Keywords:  feature request,
   Triage Stage: |  development
  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I'm new to Django and i've noticed it does not have a dd (dump and die)
 function similar to Laravel.
 The community have created this amazing package https://pypi.org/project
 /django-dump-die/0.1.5/ which does exactly that but for every new project
 this needs to be integrated.
 It would be great to have something like this part of the Django framework
 as it can be very useful for development.
 Thank you in advance,

-- 
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/01070184c4da149d-df05b6bc-dc11-4707-9e87-a52eb13bfb2a-00%40eu-central-1.amazonses.com.


Re: [Django] #28919: Add support for Common Table Expression (CTE) queries

2022-11-29 Thread Django
#28919: Add support for Common Table Expression (CTE) queries
-+-
 Reporter:  Daniel Miller|Owner:  Moses
 |  Mugisha
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  QuerySet.extra   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Eron Lloyd):

 * cc: Eron Lloyd (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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184c41a76ee-d1dc857d-33eb-4448-9c54-8eaa2957143a-00%40eu-central-1.amazonses.com.


Re: [Django] #21442: Configurable request parsing.

2022-11-29 Thread Django
#21442: Configurable request parsing.
---+--
 Reporter:  Tom Christie   |Owner:  Carlton Gibson
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Carlton Gibson):

 * owner:  (none) => Carlton Gibson
 * needs_better_patch:  0 => 1
 * status:  new => assigned


Comment:

 Following [https://groups.google.com/g/django-developers/c/O8WfDpplXuI
 thread on mailing list], we're going to approach by adding the
 `request.data` part, adding just JSON handling, before making the accepted
 content types pluggable as a second step.

 [https://github.com/django/django/pull/16341 Beginning work over here.]
 Not yet ready.

 Related to #32259 to modernise the request object at the same time.

-- 
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/01070184c3fdbdc5-78dbc655-ecaf-49a5-b53a-40b78e6d3976-00%40eu-central-1.amazonses.com.


Re: [Django] #34151: Adding explicit primary key with different type doesn't update related ManyToManyFields.

2022-11-29 Thread Django
#34151: Adding explicit primary key with different type doesn't update related
ManyToManyFields.
-+-
 Reporter:  STANISLAV LEPEKHOV   |Owner:  Bhuvnesh
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  4.1
 Severity:  Normal   |   Resolution:
 Keywords:  migrations pk uuid   | Triage Stage:  Accepted
  relation   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Bhuvnesh):

 The migration generated for this contains removing the old pk and adding
 new pk :
 {{{
 class Migration(migrations.Migration):

 dependencies = [
 ("ticket_34151", "0001_initial"),
 ]

 operations = [
 migrations.RemoveField(
 model_name="place",
 name="id",
 ),
 migrations.RemoveField(
 model_name="storechain",
 name="id",
 ),
 migrations.AddField(
 model_name="place",
 name="uid",
 field=models.UUIDField(
 default=uuid.uuid4,
 editable=False,
 primary_key=True,
 serialize=False,
 unique=True,
 ),
 ),
 migrations.AddField(
 model_name="storechain",
 name="uid",
 field=models.UUIDField(
 default=uuid.uuid4,
 editable=False,
 primary_key=True,
 serialize=False,
 unique=True,
 ),
 ),
 ]
 }}}
 but on some databases (mysql, postgres) we cannot delete a pk of a model
 which is referenced by other.
 I tried to implement a
 solution([https://github.com/django/django/pull/16325 draft PR] ) which is
 working fine for sqlite3 but throws the following error on some dbs
 (mysql, postgres) during the RemoveField operation:
 {{{
 (1829, "Cannot drop column 'id': needed in a foreign key constraint
 'ticket_34151_storech_placespk_id_ca7ce831_fk_ticket_34' of table
 'ticket_34151_storechain'")
 }}}
 This made me think if it is really possible to add a new pk to a
 referenced model for dbs like mysql and postgres?

-- 
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/01070184c3a6f4b7-c927ca03-970c-46ee-a5ae-93fc2a284090-00%40eu-central-1.amazonses.com.


Re: [Django] #34189: Code in Tutorial does not work because of a ', '

2022-11-29 Thread Django
#34189: Code in Tutorial does not work because of a ','
-+--
 Reporter:  Roger Rüttimann  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by Roger Rüttimann):

 Actually your right, I tried to reprodcue it, but I can not. Now it's
 working either way, with or without the comma.
 Sorry for the unproductive ticket and thanks for the quick feedback!

-- 
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/01070184c3970734-ffee5c5d-8375-4b66-b4c6-16e97d72c56e-00%40eu-central-1.amazonses.com.


Re: [Django] #34028: Django 'static' template tag fails to generate URLs with SCRIPT_NAME prefix

2022-11-29 Thread Django
#34028: Django 'static' template tag fails to generate URLs with SCRIPT_NAME 
prefix
-+
 Reporter:  Stewart Adam |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  4.0
 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 David Sanders):

 * cc: David Sanders (added)


Comment:

 I've been investigating `SCRIPT_NAME` / `FORCE_SCRIPT_NAME` and found some
 interesting quirks when used with `runserver` which may be affecting
 testing these issues (at least it was affecting me when investigating
 #34185

 I'm not entirely sure why yet but I'll post the following reproducible
 issue (at least for me) to show that prefixing `STATIC_URL` works
 intermittently due to a race condition with runserver and the multiple
 processes setup with autoreload:


 In `django/conf/__init__.py` I added a line to print the result of
 prefixing `STATIC_URL`:
 {{{
 @staticmethod
 def _add_script_prefix(value):
 """
 Add SCRIPT_NAME prefix to relative paths.

 Useful when the app is being served at a subpath and manually
 prefixing
 subpath to STATIC_URL and MEDIA_URL in settings is inconvenient.
 """
 # Don't apply prefix to absolute paths and URLs.
 if value.startswith(("http://;, "https://;, "/")):
 return value
 from django.urls import get_script_prefix

 val = "%s%s" % (get_script_prefix(), value)
 print("*** PREFIXING ***: " + val)
 return val
 }}}

 The result when `runserver` is run with autoreload on then off:

 {{{
 sample-project % dj runserver
 Watching for file changes with StatReloader
 Performing system checks...

 *** PREFIXING ***: /static/
 System check identified no issues (0 silenced).
 November 29, 2022 - 13:22:27
 Django version 4.2.dev20221129074011, using settings
 'django_sample.settings'
 Starting development server at http://127.0.0.1:8000/
 Quit the server with CONTROL-C.
 ^C
 django-sample % dj runserver --noreload
 Performing system checks...

 *** PREFIXING ***: /django/static/
 System check identified no issues (0 silenced).
 November 29, 2022 - 13:22:40
 Django version 4.2.dev20221129074011, using settings
 'django_sample.settings'
 Starting development server at http://127.0.0.1:8000/
 Quit the server with CONTROL-C.
 ^C
 sample-project %
 }}}

 Now the interesting thing is that I can get the same results without
 specifying `--noreload` by just adding a line to `print()` in `setup()` !
 :)

-- 
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/01070184c391683d-e8e38f92-e76d-4904-a796-75f4c538da4a-00%40eu-central-1.amazonses.com.


Re: [Django] #29574: Unable to create model instance after changing an abstract model to non-abstract due to "foreign key mismatch" error

2022-11-29 Thread Django
#29574: Unable to create model instance after changing an abstract model to non-
abstract due to "foreign key mismatch" error
+
 Reporter:  josephbiko  |Owner:  Bhuvnesh
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  2.1
 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 Bhuvnesh):

 WIP PR https://github.com/django/django/pull/16325

-- 
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/01070184c389b9fa-939eddaa-ebb8-46df-b92b-369930ca0b2a-00%40eu-central-1.amazonses.com.


Re: [Django] #34189: Code in Tutorial does not work because of a ', '

2022-11-29 Thread Django
#34189: Code in Tutorial does not work because of a ','
-+--
 Reporter:  Roger Rüttimann  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by Mariusz Felisiak):

 > I still think its a bug, because this happens when I copy paste the code
 of the tutorial and try to run the development server:

 Maybe there is a bug but not in the tutorial or Django itself, but in your
 code. You probably made some typo when copying code from the tutorial.
 Please use one of
 [https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
 support channels].

-- 
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/01070184c37cc2fe-e760bdfc-b976-4c69-b877-32a68dca4c68-00%40eu-central-1.amazonses.com.


Re: [Django] #34189: Code in Tutorial does not work because of a ', '

2022-11-29 Thread Django
#34189: Code in Tutorial does not work because of a ','
-+--
 Reporter:  Roger Rüttimann  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by Roger Rüttimann):

 Thanks for the comment @Mariusz Felisiak, but even as the code might be
 valid python, I still think its a bug, because this happens when I copy
 paste the code of the tutorial and try to run the development server:


 {{{
 (cvmanager) ➜  cvmanager git:(main) ✗ python manage.py runserver
 Watching for file changes with StatReloader
 Performing system checks...

 Exception in thread django-main-thread:
 Traceback (most recent call last):
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/urls/resolvers.py", line 717, in url_patterns
 iter(patterns)
 TypeError: 'module' object is not iterable

 The above exception was the direct cause of the following exception:

 Traceback (most recent call last):
   File
 
"/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py",
 line 1016, in _bootstrap_inner
 self.run()
   File
 
"/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py",
 line 953, in run
 self._target(*self._args, **self._kwargs)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/utils/autoreload.py", line 64, in wrapper
 fn(*args, **kwargs)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/management/commands/runserver.py", line 134, in
 inner_run
 self.check(display_num_errors=True)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/management/base.py", line 475, in check
 all_issues = checks.run_checks(
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/checks/registry.py", line 88, in run_checks
 new_errors = check(app_configs=app_configs, databases=databases)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/checks/urls.py", line 14, in check_url_config
 return check_resolver(resolver)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/checks/urls.py", line 24, in check_resolver
 return check_method()
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/urls/resolvers.py", line 495, in check
 messages.extend(check_resolver(pattern))
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/core/checks/urls.py", line 24, in check_resolver
 return check_method()
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/urls/resolvers.py", line 494, in check
 for pattern in self.url_patterns:
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/utils/functional.py", line 57, in __get__
 res = instance.__dict__[self.name] = self.func(instance)
   File "/Users/rroger/py_virtualenvs/cvmanager/lib/python3.10/site-
 packages/django/urls/resolvers.py", line 725, in url_patterns
 raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e
 django.core.exceptions.ImproperlyConfigured: The included URLconf '' does not
 appear to have any patterns in it. If you see the 'urlpatterns' variable
 with valid patterns in the file then the issue is probably caused by a
 circular import.
 }}}

 and without the ',' it works as expected. I think code in a tutorial
 should run without raisng exceptions.

-- 
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/01070184c377032f-992b3ead-c8df-4a91-ba7e-8fe4fbc9fbb8-00%40eu-central-1.amazonses.com.


Re: [Django] #34189: Code in Tutorial does not work because of a ', '

2022-11-29 Thread Django
#34189: Code in Tutorial does not work because of a ','
-+--
 Reporter:  Roger Rüttimann  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Changes (by Mariusz Felisiak):

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


Comment:

 `urlpatterns` is a list and this example is a valid Python code. Trac is
 not a support channel, so if you're having trouble understanding how
 Python/Django works, see TicketClosingReasons/UseSupportChannels for ways
 to get help.

-- 
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/01070184c361ae2c-6a4b6150-a75e-44c0-ac71-bb31bb6a6e73-00%40eu-central-1.amazonses.com.


[Django] #34189: Code in Tutorial does not work because of a ','

2022-11-29 Thread Django
#34189: Code in Tutorial does not work because of a ','
-+
   Reporter:  rroger |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Documentation  |Version:  4.1
   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  |
-+
 Page: https://docs.djangoproject.com/en/4.1/intro/tutorial01/

 Code

 {{{
 from django.urls import path

 from . import views

 urlpatterns = [
 path('', views.index, name='index'),
 ]
 }}}

 the ',' at the end of path(...) needs to be removed, otherwise an
 exception is raised and the code does not work.

 it should be:


 {{{
 from django.urls import path

 from . import views

 urlpatterns = [
 path('', views.index, name='index')
 ]
 }}}


 I am sorry in case I violite some buge tracking conventions. I actually
 want to continue with the tutorial, but wanted to raise the issue. Thanks
 for the otherwise greate tutorial! :)

-- 
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/01070184c35b49f6-b38b490f-2f45-493e-ba89-95bbf9025518-00%40eu-central-1.amazonses.com.


Re: [Django] #29510: QueryDict.copy() returns closed files when the type of file is TemporaryUploadedFile

2022-11-29 Thread Django
#29510: QueryDict.copy() returns closed files when the type of file is
TemporaryUploadedFile
-+-
 Reporter:  Liquid Scorpio   |Owner:  Dan
 |  Madere
 Type:  Bug  |   Status:  assigned
Component:  File |  Version:  1.11
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  QueryDict, upload,   | Triage Stage:  Accepted
  file   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Carlton Gibson):

 Hey Dan — just to let you know, I'm looking at the request object now,
 with this half in mind. Will follow-up once I've done that. Thanks

-- 
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/01070184c2f70e87-351f8164-ae83-4472-b319-19a41c17bdee-00%40eu-central-1.amazonses.com.


Re: [Django] #34188: Add a section on refresh_from_db to the Multiple databases documentation

2022-11-29 Thread Django
#34188: Add a section on refresh_from_db to the Multiple databases documentation
---+--
 Reporter:  martinmain93   |Owner:  Leo Tom
 Type:  Uncategorized  |   Status:  closed
Component:  Documentation  |  Version:  4.1
 Severity:  Normal |   Resolution:  wontfix
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--
Changes (by Carlton Gibson):

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


Comment:

 I think this is already covered by the note in the
 
[https://docs.djangoproject.com/en/4.1/ref/models/instances/#django.db.models.Model.refresh_from_db
 refresh_from_db docs]:

 > The reloading happens from the database the instance was loaded from, or
 from the default database if the instance wasn’t loaded from the database.
 The `using` argument can be used to force the database used for reloading.

-- 
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/01070184c2dad93d-06194c91-4625-4691-8a8e-9a97884c255a-00%40eu-central-1.amazonses.com.


Re: [Django] #34185: Serving static/media files during development can't work when use SCRIPT_NAME

2022-11-29 Thread Django
#34185: Serving static/media files during development can't work when use
SCRIPT_NAME
---+--
 Reporter:  YQ |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Documentation  |  Version:  4.1
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Carlton Gibson):

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


Comment:

 Did you see the note about this topic in the STATIC_URL docs?
 https://docs.djangoproject.com/en/4.1/ref/settings/#static-url

 Please see TicketClosingReasons/UseSupportChannels for places to get usage
 advice.

-- 
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/01070184c2ca1613-9e189495-8b7c-410c-94e4-36cd8cc3d0bf-00%40eu-central-1.amazonses.com.


Re: [Django] #34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.

2022-11-29 Thread Django
#34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.
-+-
 Reporter:  Martin Lehoux|Owner:  Martin
 |  Lehoux
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Release blocker  |   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 Mariusz Felisiak):

 [https://github.com/django/django/pull/16339 PR]

-- 
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/01070184c2bfbc06-40358447-8a6d-42ba-9750-a36607bef53f-00%40eu-central-1.amazonses.com.


Re: [Django] #34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.

2022-11-29 Thread Django
#34160: Django 4.1 Expression contains mixed types for (Big/Small)IntegerFields.
-+-
 Reporter:  Martin Lehoux|Owner:  Martin
 |  Lehoux
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Release blocker  |   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 Mariusz Felisiak):

 Replying to [comment:15 Mariusz Felisiak]:
 > `Case()` is trying to resolve an output type only for specific fields
 that cannot be implicitly cast on PostgreSQL (namely
 `GenericIPAddressField`, `IPAddressField`, `TimeField`, and `UUIDField`)
 in other cases PostgreSQL does the work, see
 [https://www.postgresql.org/docs/current/typeconv-union-case.html docs].
 As far as I'm aware, we should be safe to ignore errors in resolving an
 output field in other cases:

 After a deeper investigation, this ☝️ only fixes one case:
 {{{#!python
 Case(
 When(Value(True), then=F("small_integer") + Value(1)),
 default=F("integer"),
 )
 }}}
 the following still crashes:
 {{{#!python
 Case(
 When(Value(True), then=F("small_integer") + Value(1)),
 default=F("small_integer"),
 )
 }}}
 I don't think it's worth changing anymore. I theory,
 40b8a6174f001a310aa33f7880db0efeeb04d4c4 is a regression, however the
 previous behavior was also buggy, e.g. `F("small_integer") +
 Value(1)` was resolved to `SmallIntegerField`, so I think it
 better to raise an exception in all cases. I'm going to add a small
 release note and close this as "wontfix" when it gets merged.

-- 
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/01070184c2a625b7-61caad4b-2967-48b7-bb67-95b5ce46d40e-00%40eu-central-1.amazonses.com.


Re: [Django] #34188: Add a section on refresh_from_db to the Multiple databases documentation

2022-11-29 Thread Django
#34188: Add a section on refresh_from_db to the Multiple databases documentation
---+--
 Reporter:  martinmain93   |Owner:  Leo Tom
 Type:  Uncategorized  |   Status:  assigned
Component:  Documentation  |  Version:  4.1
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--
Changes (by Leo Tom):

 * owner:  nobody => Leo Tom
 * 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/01070184c2998003-685d4897-5a2c-4656-9e3b-bc9af65f7c1b-00%40eu-central-1.amazonses.com.


Re: [Django] #33701: Highlight error location in the technical 500 debug page on Python 3.11+.

2022-11-29 Thread Django
#33701: Highlight error location in the technical 500 debug page on Python 
3.11+.
-+-
 Reporter:  Adam Johnson |Owner:  Giebisch
 Type:  New feature  |   Status:  closed
Component:  Error reporting  |  Version:  dev
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  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:"85b52d22fd2841c34e95b3a80d6f2b668ce2f160" 85b52d22]:
 {{{
 #!CommitTicketReference repository=""
 revision="85b52d22fd2841c34e95b3a80d6f2b668ce2f160"
 Fixed #33701 -- Added fine-grained error locations to the technical 500
 debug page.
 }}}

-- 
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/01070184c27e1ec5-6fdb6dc3-788a-4fbe-b57b-09291d052908-00%40eu-central-1.amazonses.com.


Re: [Django] #33752: Display exception groups on the technical 500 debug page on Python 3.11+.

2022-11-29 Thread Django
#33752: Display exception groups on the technical 500 debug page on Python 
3.11+.
-+
 Reporter:  Adam Johnson |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Error reporting  |  Version:  dev
 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 Mariusz Felisiak):

 * cc: Giebisch (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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184c27bee4b-3a3abdab-08de-4819-b7fa-f8599b1b89f2-00%40eu-central-1.amazonses.com.