Re: [Django] #33942: file validator - validating file with mime and magic numbers

2022-08-19 Thread Django
#33942: file validator - validating file with mime and magic numbers
-+-
 Reporter:  Reza Shakeri |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  File |  Version:  4.0
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  file-validator,  | Triage Stage:
  file, validator|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Reza Shakeri:

Old description:

> I want to add a file validator to Django using the native Python library
> called mimetypes [https://docs.python.org/3/library/mimetypes.html]
> There is a file validator in Django, but it only validates files using
> the extension, which is not very reliable. According to the
> documentation, I wrote a file validator that checks the magic numbers
> (mimes) of the files, and it is more reliable and reliable with It
> supports the use of native Python libraries and many mimes, This file
> validator can check the size of files in addition to mimes and validate
> both of them.
>
> I wrote a file validator library using Python, which you can use using
> the link below and see its codes:
> [https://github.com/rzashakeri/file_validator]
>

> The file validator code that I wrote myself and you can check:
> https://github.com/rzashakeri/file_validator/blob/cfdb9cc90dba9708d895f18095a8177cd3392779/file_validator/django.py#L92

New description:

 I want to add a file validator to Django using the native Python library
 called mimetypes [https://docs.python.org/3/library/mimetypes.html]
 There is a file validator in Django, but it only validates files using the
 extension, which is not very reliable. According to the documentation, I
 wrote a file validator that checks the magic numbers (mimes) of the files
 In addition to file extensions, and it is more reliable and reliable with
 It supports the use of native Python libraries and many mimes, This file
 validator can check the size of files in addition to mimes and validate
 both of them.

 I wrote a file validator library using Python, which you can use using the
 link below and see its codes:
 [https://github.com/rzashakeri/file_validator]


 The file validator code that I wrote myself and you can check:
 
https://github.com/rzashakeri/file_validator/blob/cfdb9cc90dba9708d895f18095a8177cd3392779/file_validator/django.py#L92

--

-- 
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/01070182b8eda7bb-3050a620-d298-437f-b5a0-7961cb7305b9-00%40eu-central-1.amazonses.com.


Re: [Django] #33942: file validator - validating file with mime and magic numbers

2022-08-19 Thread Django
#33942: file validator - validating file with mime and magic numbers
-+-
 Reporter:  rzashakeri   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  File |  Version:  4.0
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  file-validator,  | Triage Stage:
  file, validator|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by rzashakeri:

Old description:

> I want to add a file validator to Django using the native Python library
> called mimetypes [https://docs.python.org/3/library/mimetypes.html]
> There is a file validator in Django, but it only validates files using
> the extension, which is not very reliable. According to the
> documentation, I wrote a file validator that checks the magic numbers
> (mimes) of the files, and it is more reliable and reliable with It
> supports the use of native Python libraries and many mimes, This file
> validator can check the size of files in addition to mimes and validate
> both of them.
>
> I wrote a file validator library using Python, which you can use using
> the link below and see its codes:
> [https://github.com/rzashakeri/file_validator]
>

> file validator code :
> https://github.com/rzashakeri/file_validator/blob/cfdb9cc90dba9708d895f18095a8177cd3392779/file_validator/django.py#L92

New description:

 I want to add a file validator to Django using the native Python library
 called mimetypes [https://docs.python.org/3/library/mimetypes.html]
 There is a file validator in Django, but it only validates files using the
 extension, which is not very reliable. According to the documentation, I
 wrote a file validator that checks the magic numbers (mimes) of the files,
 and it is more reliable and reliable with It supports the use of native
 Python libraries and many mimes, This file validator can check the size of
 files in addition to mimes and validate both of them.

 I wrote a file validator library using Python, which you can use using the
 link below and see its codes:
 [https://github.com/rzashakeri/file_validator]


 The file validator code that I wrote myself and you can check:
 
https://github.com/rzashakeri/file_validator/blob/cfdb9cc90dba9708d895f18095a8177cd3392779/file_validator/django.py#L92

--

-- 
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/01070182b8ea0835-e1a64a4c-d7a8-4c5e-a859-0cab7aa91e77-00%40eu-central-1.amazonses.com.


Re: [Django] #33942: file validator - validating file with mime and magic numbers

2022-08-19 Thread Django
#33942: file validator - validating file with mime and magic numbers
-+-
 Reporter:  Reza Shakeri |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  File |  Version:  4.0
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  file-validator,  | Triage Stage:
  file, validator|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Reza Shakeri:

Old description:

> I want to add a file validator to Django using the native Python library
> called mimetypes [https://docs.python.org/3/library/mimetypes.html]
> There is a file validator in Django, but it only validates files using
> the extension, which is not very reliable. According to the
> documentation, I wrote a file validator that checks the magic numbers
> (mimes) of the files, and it is more reliable and reliable with It
> supports the use of native Python libraries and many mimes
>
> I wrote a file validator library using Python, which you can use using
> the link below and see its codes:
> [https://github.com/rzashakeri/file_validator]

New description:

 I want to add a file validator to Django using the native Python library
 called mimetypes [https://docs.python.org/3/library/mimetypes.html]
 There is a file validator in Django, but it only validates files using the
 extension, which is not very reliable. According to the documentation, I
 wrote a file validator that checks the magic numbers (mimes) of the files,
 and it is more reliable and reliable with It supports the use of native
 Python libraries and many mimes, This file validator can check the size of
 files in addition to mimes and validate both of them.

 I wrote a file validator library using Python, which you can use using the
 link below and see its codes:
 [https://github.com/rzashakeri/file_validator]


 file validator code :
 
https://github.com/rzashakeri/file_validator/blob/cfdb9cc90dba9708d895f18095a8177cd3392779/file_validator/django.py#L92

--

-- 
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/01070182b8e88ca3-01c56eb3-8b3f-4b85-b62b-6839ac8ff2a9-00%40eu-central-1.amazonses.com.


Re: [Django] #33942: file validator - validating file with mime and magic numbers (was: file validator)

2022-08-19 Thread Django
#33942: file validator - validating file with mime and magic numbers
-+-
 Reporter:  Reza Shakeri |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  File |  Version:  4.0
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  file-validator,  | Triage Stage:
  file, validator|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

-- 
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/01070182b8de3a1b-42cd7cb9-ce9d-4ed0-9c39-495f91da3c95-00%40eu-central-1.amazonses.com.


Re: [Django] #33942: file validator (was: file validator - validating file with mime and magic numbers)

2022-08-19 Thread Django
#33942: file validator
-+-
 Reporter:  Reza Shakeri |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  File |  Version:  4.0
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  file-validator,  | Triage Stage:
  file, validator|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Reza Shakeri:

Old description:

> There is a file validator in Django, but it only validates files using
> the extension, which is not very reliable. According to the
> documentation, I wrote a file validator that checks the magic numbers
> (mimes) of the files, and it is more reliable and reliable with It
> supports the use of native Python libraries and many mimes

New description:

 I want to add a file validator to Django using the native Python library
 called mimetypes [https://docs.python.org/3/library/mimetypes.html]
 There is a file validator in Django, but it only validates files using the
 extension, which is not very reliable. According to the documentation, I
 wrote a file validator that checks the magic numbers (mimes) of the files,
 and it is more reliable and reliable with It supports the use of native
 Python libraries and many mimes

 I wrote a file validator library using Python, which you can use using the
 link below and see its codes:
 [https://github.com/rzashakeri/file_validator]

--

-- 
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/01070182b8ddadda-d61571d5-d361-4b95-9e1d-be525e3d8335-00%40eu-central-1.amazonses.com.


Re: [Django] #33942: file validator - validating file with mime and magic numbers (was: file validator - validating file with mime and file magic numbers)

2022-08-19 Thread Django
#33942: file validator - validating file with mime and magic numbers
-+-
 Reporter:  Reza Shakeri |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  File |  Version:  4.0
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  file-validator,  | Triage Stage:
  file, validator|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

-- 
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/01070182b8d67cca-ba6cd497-4628-450b-a63b-baa4b26daea8-00%40eu-central-1.amazonses.com.


Re: [Django] #33942: file validator - validating file with mime and file magic numbers (was: file validator - validate file use mime)

2022-08-19 Thread Django
#33942: file validator - validating file with mime and file magic numbers
-+-
 Reporter:  rzashakeri   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  File |  Version:  4.0
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  file-validator,  | Triage Stage:
  file, validator|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

-- 
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/01070182b8d62dbc-b8336441-b229-4363-8ec7-0740183ef364-00%40eu-central-1.amazonses.com.


Re: [Django] #33942: file validator - validate file use mime (was: file validator)

2022-08-19 Thread Django
#33942: file validator - validate file use mime
-+-
 Reporter:  rzashakeri   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  File |  Version:  4.0
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  file-validator,  | Triage Stage:
  file, validator|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

-- 
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/01070182b8d4dedc-c46faf88-f37e-42b0-ac50-528248359e46-00%40eu-central-1.amazonses.com.


Re: [Django] #33942: file validator

2022-08-19 Thread Django
#33942: file validator
-+-
 Reporter:  rzashakeri   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  File |  Version:  4.0
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  file-validator,  | Triage Stage:
  file, validator|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by rzashakeri:

Old description:

> There is a file validator in Django, but it only validates files using
> the extension, which is not very reliable. According to the
> documentation, I wrote a file validator that checks the magic numbers
> (mimes) of the files, and it is more reliable and reliable with It
> supports the use of native Python libraries and many mimes
>
> I also created a Python
> [file_validator](https://github.com/rzashakeri/file_validator) library
> where, in addition to the Python library, three third-party libraries
> also perform validation operations.

New description:

 There is a file validator in Django, but it only validates files using the
 extension, which is not very reliable. According to the documentation, I
 wrote a file validator that checks the magic numbers (mimes) of the files,
 and it is more reliable and reliable with It supports the use of native
 Python libraries and many mimes

--

-- 
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/01070182b8d3b3d4-e835ebe3-c351-4612-a61b-294732fe541d-00%40eu-central-1.amazonses.com.


[Django] #33942: file validator

2022-08-19 Thread Django
#33942: file validator
-+-
   Reporter: |  Owner:  nobody
  rzashakeri |
   Type:  New| Status:  new
  feature|
  Component:  File   |Version:  4.0
  uploads/storage|   Keywords:  file-validator,
   Severity:  Normal |  file, validator
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 There is a file validator in Django, but it only validates files using the
 extension, which is not very reliable. According to the documentation, I
 wrote a file validator that checks the magic numbers (mimes) of the files,
 and it is more reliable and reliable with It supports the use of native
 Python libraries and many mimes

 I also created a Python
 [file_validator](https://github.com/rzashakeri/file_validator) library
 where, in addition to the Python library, three third-party libraries also
 perform validation operations.

-- 
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/01070182b8d1ceb2-e070e4ea-ff73-42c0-a72e-e310f7e3d8ee-00%40eu-central-1.amazonses.com.


Re: [Django] #30947: Apply data structure best practices to the django.contrib models and docs

2022-08-19 Thread Django
#30947: Apply data structure best practices to the django.contrib models and 
docs
-+-
 Reporter:  Jon Dufresne |Owner:  Ojas
 Type:   |  Gupta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Simon Charette):

 Some of the examples you pointed should remain tuples as they are mixing
 heterogenous data and mostly used to a define a schema over data.

 Since we're on the topic of data structure best practices
 `unique_together` and friends should likely be defined as `set` and not
 `list` as only unique entries will be considered and because the order in
 which they are defined on the model doesn't have any significance.

-- 
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/01070182b818b4c9-3417b57d-a100-409a-a016-cb0a7ea51394-00%40eu-central-1.amazonses.com.


[Django] #33941: AutoField -> BigAutoField causes PostgreSQL sequence value changes

2022-08-19 Thread Django
#33941: AutoField -> BigAutoField causes PostgreSQL sequence value changes
-+-
   Reporter:  Barry  |  Owner:  nobody
  Johnson|
   Type:  Bug| Status:  new
  Component:  Database   |Version:  3.2
  layer (models, ORM)|   Keywords:  BigAutoField,
   Severity:  Normal |  sequence
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 When changing a primary key from AutoField to BigAutoField, the underlying
 PostgreSQL sequence may also have to be changed from type "integer" to
 "big integer".  Django automatically makes that change by dropping and
 recreating the sequence, then sets the sequence's value to the max value
 of the primary keys currently in the table.

 There are use cases where this reset of the sequence value is problematic.
 Consider the case of a "work in progress" table whose primary key is
 considered the unique identifier for each entity, and the contents of that
 work-in-progress table are eventually moved to a historical log table (and
 removed from the original table).  Should the WIP table be empty when its
 primary key is changed from AutoField to BigAutoField, then the sequence
 value will be set back to a Null and the next WIP record will have a
 primary key of 1 -- duplicating a key previously recorded in the log
 table.  The "always incrementing" sequence will be reset to a lower value
 any time the most recently added record to the WIP table has been deleted
 prior to the key change -- and that sudden decrease in value has caused
 downstream application failures.

 The request is to have Django preserve the value of the sequence across
 the drop and recreate steps and avoid this loss of information.  If that
 change is not acceptable, the fallback request is to document the
 behavior.

 This is particularly subtle problem because sequences are relatively
 invisible to most ORM programmers.  Unless they carefully watch the SQL
 executed during a migration, they wouldn't really be aware that the
 sequence is being dropped and recreated -- and particularly unaware that
 the sequence could be reset to a smaller value -- they only discover the
 problem after reports of duplicate  key values when new WIP rows are
 eventually transferred to the log table.

-- 
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/01070182b813f0b0-58afd45d-4692-4046-9f11-276fe8fe1577-00%40eu-central-1.amazonses.com.


Re: [Django] #33940: Offline PDF and ePub doc links for Django 4.1 do not work

2022-08-19 Thread Django
#33940: Offline PDF and ePub doc links for Django 4.1 do not work
---+--
 Reporter:  Jose Gomez |Owner:  nobody
 Type:  Bug|   Status:  new
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:  1
---+--

Comment (by Jose Gomez):

 Changing Django version to 4.1

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182b7732dd9-c8de371c-3537-422d-aea2-4336c4439692-00%40eu-central-1.amazonses.com.


Re: [Django] #33940: Offline PDF and ePub doc links for Django 4.1 do not work

2022-08-19 Thread Django
#33940: Offline PDF and ePub doc links for Django 4.1 do not work
---+--
 Reporter:  pipoe2h|Owner:  nobody
 Type:  Bug|   Status:  new
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:  1
---+--
Changes (by pipoe2h):

 * version:  4.0 => 4.1


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182b772db3c-776900ee-c8f2-4ab0-aa3a-175e72eb3c90-00%40eu-central-1.amazonses.com.


[Django] #33940: Offline PDF and ePub doc links for Django 4.1 do not work

2022-08-19 Thread Django
#33940: Offline PDF and ePub doc links for Django 4.1 do not work
-+
   Reporter:  Jose Gomez |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Documentation  |Version:  4.0
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  1  |
-+
 The links to download the offline copies of Django 4.1 documentation for
 PDF and ePub are not working. The HTML ZIP works with no issue. Also, the
 PDF and ePub links for 4.0 works with no issue.

 The errors for 4.1 are:


 {{{
 
 NoSuchKey
 The specified key does not exist.
 pdf/django/4.1.x/django.pdf
 7J600Y86EV0DZSVQ
 
Ws7bhTl1wIY1gSz1n43zcVZr3ln6Mdonj+9J0dPPBq2QXcl1ArM6xsJgTwj/pgAJmUrHlriWEBk=
 
 }}}



 {{{
 
 NoSuchKey
 The specified key does not exist.
 epub/django/4.1.x/django.epub
 YGSDD98S1RWSHC5G
 
LgJaKVwIXmhoUouEAiqnE2gz8DO5zvbnJsSG/XIR/lMNdiWlFRbn2jhAB/jfrRNL1ZRHW8IJr+8=
 
 }}}

-- 
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/01070182b7726fc1-032cd176-35be-400e-b4db-460ad7af05c2-00%40eu-central-1.amazonses.com.


Re: [Django] #30947: Apply data structure best practices to the django.contrib models and docs

2022-08-19 Thread Django
#30947: Apply data structure best practices to the django.contrib models and 
docs
-+-
 Reporter:  Jon Dufresne |Owner:  Ojas
 Type:   |  Gupta
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Alex Morega):

 This is actually a pet peeve of mine; would love to see the docs updated
 to using lists instead of tuples.

 Would this be a good checklist of places to update in the codebase and
 docs? https://gist.github.com/mgax/32318118a71ce602a00a80daeecb60fc

-- 
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/01070182b75b0164-50bfb182-06d8-4e3a-8a0f-041127133053-00%40eu-central-1.amazonses.com.


Re: [Django] #33938: Defining the "through" model in a many-to-many field in another app causes "AttributeError: 'str' object has no attribute '_meta'" on migration

2022-08-19 Thread Django
#33938: Defining the "through" model in a many-to-many field in another app 
causes
"AttributeError: 'str' object has no attribute '_meta'" on migration
-+-
 Reporter:  bryan.af7|Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:  migration many-to-   | Triage Stage:  Accepted
  many bug   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * has_patch:  0 => 1


Comment:

 This is a regression in Django 4.0 caused by
 aa4acc164d1247c0de515c959f7b09648b57dc42,
 [https://github.com/django/django/pull/15973 this PR] should solve it.

 You can manually resolve the issue for your project by breaking the
 `fonte` migration generated on `makemigration` in two by moving the
 `variaveis` out of the `CreateModel` to an `AddField` operation that
 depends on the two others.

 This can be achieve with `makemigrations` with the following sequence of
 operation.

 1. Keep your models as they are defined now.
 2. Comment the `variaveis` definition.
 3. Run `makemigrations`
 4. Uncomment `variaveis`
 5. Run `makemigrations`
 6. Edit the latest migration for `fonte`, the one with the
 `AddField('FonteModel', 'variaveis', ...)`, to add an entry in
 `dependencies` that refers to the migration where
 `fonte_variavel.FonteVariavelModel` is defined when running step 3.

-- 
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/01070182b751aeee-dabfcbc5-935c-4fc7-a2d3-1d5801587a07-00%40eu-central-1.amazonses.com.


Re: [Django] #32210: Django Admin with Inlines not using UUIDField default value

2022-08-19 Thread Django
#32210: Django Admin with Inlines not using UUIDField default value
--+
 Reporter:  Joseph Metzinger  |Owner:  (none)
 Type:  Bug   |   Status:  assigned
Component:  Forms |  Version:  3.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
--+
Changes (by NeErAj KuMaR):

 * owner:  nobody => (none)
 * 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/01070182b74f39da-de27b407-27d2-4448-96b4-49d90e9d47e1-00%40eu-central-1.amazonses.com.


Re: [Django] #33939: Change docs for transaction.on_commit to suggest functools.partial instead of lambda

2022-08-19 Thread Django
#33939: Change docs for transaction.on_commit to suggest functools.partial 
instead
of lambda
---+--
 Reporter:  Alex Morega|Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Documentation  |  Version:  dev
 Severity:  Normal |   Resolution:
 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 Alex Morega):

 * version:  4.0 => dev
 * component:  Uncategorized => Documentation


-- 
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/01070182b7499790-2ea3ae13-ef00-45fe-84a4-451abe37a7cd-00%40eu-central-1.amazonses.com.


[Django] #33939: Change docs for transaction.on_commit to suggest functools.partial instead of lambda

2022-08-19 Thread Django
#33939: Change docs for transaction.on_commit to suggest functools.partial 
instead
of lambda
-+
   Reporter:  Alex Morega|  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Uncategorized  |Version:  4.0
   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  |
-+
 I've recently got bitten by a silly bug:

 {{{#!python
 for n in range(10):
 transaction.on_commit(lambda: do_something(n))
 }}}

 Of course, instead of calling `do_something(0)`, `do_something(1)` ...,
 it's going to call `do_something(9)` 10 times.

 The docs could help by suggesting
 [https://docs.python.org/3/library/functools.html#functools.partial
 functools.partial] instead of `lambda`. The above example becomes:

 {{{#!python
 for n in range(10):
 transaction.on_commit(partial(do_something, n))
 }}}

 If this change is a good idea I can have a go at making a 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/01070182b74936f0-2a2de634-72f0-4ff7-a2b3-43f6d2a4d3c5-00%40eu-central-1.amazonses.com.


Re: [Django] #33938: Defining the "through" model in a many-to-many field in another app causes "AttributeError: 'str' object has no attribute '_meta'" on migration

2022-08-19 Thread Django
#33938: Defining the "through" model in a many-to-many field in another app 
causes
"AttributeError: 'str' object has no attribute '_meta'" on migration
-+-
 Reporter:  bryan.af7|Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:  migration many-to-   | Triage Stage:  Accepted
  many bug   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * owner:  nobody => Simon Charette
 * status:  new => assigned
 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182b745240c-5b842307-9980-42e2-8f9d-ffea722cbfca-00%40eu-central-1.amazonses.com.


Re: [Django] #33938: Defining the "through" model in a many-to-many field in another app causes "AttributeError: 'str' object has no attribute '_meta'" on migration

2022-08-19 Thread Django
#33938: Defining the "through" model in a many-to-many field in another app 
causes
"AttributeError: 'str' object has no attribute '_meta'" on migration
-+-
 Reporter:  bryan.af7|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:  migration many-to-   | Triage Stage:
  many bug   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by mgax):

 I was able to reproduce the problem with your models. Moving the
 `FonteVariavelModel` model to the `fonte` app seems to work.

 Even if there's a bug in Django, as a workaround, why not simply move the
 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182b7343df9-aa7e07c0-61c6-465b-90e7-c4ffe5c1e60d-00%40eu-central-1.amazonses.com.


[Django] #33938: Defining the "through" model in a many-to-many field in another app causes "AttributeError: 'str' object has no attribute '_meta'" on migration

2022-08-19 Thread Django
#33938: Defining the "through" model in a many-to-many field in another app 
causes
"AttributeError: 'str' object has no attribute '_meta'" on migration
-+-
   Reporter:  bryan.af7  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component: |Version:  4.0
  Migrations |   Keywords:  migration many-to-
   Severity:  Normal |  many bug
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I tried migrating my apps into the database, the three relevant apps are
 called: "fonte", "fonte_variavel" and "variavel". fonte and variavel
 models have a many-to-many relationship (field being defined on "fonte").
 The many-to-many field uses fonte_variavel model as the "through"
 argument. Below are the models when I define them on separate apps.


 {{{
 # core/fonte/models.py

 class FonteModel(Model):
 nome = TextField(unique=True)
 descricao = TextField()
 data_inicial = DateField()
 data_final = DateField(blank=True, null=True)
 variaveis = ManyToManyField("variavel.VariavelModel",
 through="fonte_variavel.FonteVariavelModel")

 def __str__(self):
 return self.nome

 class Meta:
 db_table = "fontes"
 verbose_name = "Fonte"
 verbose_name_plural = "Fontes"
 }}}

 {{{
 # core/variavel/models.py
 class VariavelModel(Model):
 nome = TextField(unique=True)
 descricao = TextField()

 class Meta:
 db_table = 'variaveis'
 verbose_name = 'Variável'
 verbose_name_plural = 'Variáveis'

 }}}


 {{{
 # core/fonte_variavel/models.py

 class FonteVariavelModel(Model):
 variavel = ForeignKey('variavel.VariavelModel', on_delete=CASCADE)
 fonte = ForeignKey('fonte.FonteModel', on_delete=CASCADE)


 class Meta:
 db_table = 'fontes_variaveis'
 verbose_name = 'Fonte'
 verbose_name_plural = 'Fontes'
 }}}



 Generated migration file for Fonte
 {{{
 # Generated by Django 4.1 on 2022-08-17 21:00

 from django.db import migrations, models


 class Migration(migrations.Migration):

 initial = True

 dependencies = [
 ('variavel', '__first__'),
 ]

 operations = [
 migrations.CreateModel(
 name='FonteModel',
 fields=[
 ('id', models.BigAutoField(auto_created=True,
 primary_key=True, serialize=False, verbose_name='ID')),
 ('nome', models.TextField(unique=True)),
 ('descricao', models.TextField()),
 ('data_inicial', models.DateField()),
 ('data_final', models.DateField(blank=True, null=True)),
 ('variaveis',
 models.ManyToManyField(through='fonte_variavel.FonteVariavelModel',
 to='variavel.variavelmodel')),
 ],
 options={
 'verbose_name': 'Fonte',
 'verbose_name_plural': 'Fontes',
 'db_table': 'fontes',
 },
 ),
 ]
 }}}





 If I put "fonte_variavel" model inside "fonte"'s models.py, it works, but
 if I do the same for "variavel" and continue having FonteVariavelModel in
 a different app, it continues not working, so the problem must be with
 exclusively with the ManyToMany intermediary model. Here is the trace:

 {{{
   Applying fonte.0001_initial...Traceback (most recent call last):
   File "/home/elysium/tutes/django-test-stuff/django-bugfix/manage.py",
 line 22, in 
 main()
   File "/home/elysium/tutes/django-test-stuff/django-bugfix/manage.py",
 line 18, in main
 execute_from_command_line(sys.argv)
   File "/home/elysium/.local/share/virtualenvs/django-bugfix-
 O9qARFZW/lib/python3.9/site-packages/django/core/management/__init__.py",
 line 446, in e
 xecute_from_command_line
 utility.execute()
   File "/home/elysium/.local/share/virtualenvs/django-bugfix-
 O9qARFZW/lib/python3.9/site-packages/django/core/management/__init__.py",
 line 440, in e
 xecute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/home/elysium/.local/share/virtualenvs/django-bugfix-
 O9qARFZW/lib/python3.9/site-packages/django/core/management/base.py", line
 402, in run_f
 rom_argv
 self.execute(*args, **cmd_options)
   File "/home/elysium/.local/share/virtualenvs/django-bugfix-
 O9qARFZW/lib/python3.9/site-packages/django/core/management/base.py", line
 448, in execu
 te
 output = self.handle(*args, **options)
   File "/home/elysium/.local/share/virtualenvs/django-bugfix-
 O9qARFZW/lib/python3.9/site-packages/django/core/management/base.py", line
 96, in wrappe
 d
 res = handle_func(*a

Re: [Django] #33651: Support prefetch GenericForeignKey with custom queryset.

2022-08-19 Thread Django
#33651: Support prefetch GenericForeignKey with custom queryset.
-+-
 Reporter:  elonzh   |Owner:
 |  Gullapalli Saisurya Revanth
 Type:  New feature  |   Status:  assigned
Component:   |  Version:  4.0
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:  GenericForeignKey| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Gullapalli Saisurya Revanth):

 * needs_better_patch:  1 => 0


-- 
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/01070182b5037cf9-5f88f2a7-6bba-4c98-b205-74dfd78d9072-00%40eu-central-1.amazonses.com.