Fellow Reports - August 2020

2020-08-10 Thread Mariusz Felisiak

Week ending August 9, 2020.

Released Django 2.2.15, 3.0.9, and 3.1.

*Triaged:*
https://code.djangoproject.com/ticket/31849 - django-admin startproject 
- Fails to create files after encountering CommandError (wontfix)
https://code.djangoproject.com/ticket/31848 - Support namespaced 
django.contrib.admindocs views. (wontfix)
https://code.djangoproject.com/ticket/31851 - list_filter not working 
with foreign keys (needsinfo)
https://code.djangoproject.com/ticket/31850 - test_extraction_warning 
(i18n.test_extraction.BasicExtractorTests) fails with xgettext 0.21. 
(accepted)
https://code.djangoproject.com/ticket/24782 - Add 
TestCase.assertFormValid (wontfix)
https://code.djangoproject.com/ticket/31854 - Long model names are not 
wrapped in the navigation sidebar. (created)
https://code.djangoproject.com/ticket/31856 - Add block to customize 
nav_ sidebar. (invalid)
https://code.djangoproject.com/ticket/31859 - Admin side_bar showing up 
in models detail pages. (invalid)
https://code.djangoproject.com/ticket/31857 - Admin side_bar showing up 
in login form with django-otp. (invalid)
https://code.djangoproject.com/ticket/31863 - FK field caching behavior 
change between 1.11.x and 2.x (accepted)
https://code.djangoproject.com/ticket/31864 - Session data cannot be 
decoded during the transition to Django 3.1. (created)
https://code.djangoproject.com/ticket/31868 - Plural forms expression 
could be dangerous (duplicate)

*Reviewed/committed:*
https://github.com/django/django/pull/13267 - Fixed #26977 -- Made 
abstract models raise TypeError when instantiating.
https://github.com/django/django/pull/13257 - Refs #31493 -- Replaced 
var with const and let in JavaScriptCatalog template.
https://github.com/django/django/pull/12163 - Used mock.Mock() in 
SMTPBackendTests.
https://github.com/django/django/pull/13265 - Fixed #31831 -- Fixed 
migration operations ordering when adding order_with_respect_to and 
constraints/indexes.

*Reviewed:*
https://github.com/django/django/pull/13173 - Fixed #25513 -- Extracted 
admin pagination to Paginator.get_elided_page_range()

*Authored:*
https://github.com/django/djangoproject.com/pull/1012 - Updated 
download page for 3.1 release.
https://github.com/django/djangoproject.com/pull/1013 - Updated 
robots.docs.txt for Django 3.1.
https://github.com/django/djangoproject.com/pull/1014 - Updated 
docs-related model fixtures for 3.1 release.
https://github.com/django/django/pull/13275 - Fixed #31854 -- Fixed 
wrapping of long model names in admin's sidebar.
https://github.com/django/django/pull/13279 - Fixed #31864 -- Fixed 
encoding session data during transition to Django 3.1. 

Best,
Mariusz

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/40709a87-c345-4c85-9509-f99e74dbf4f9n%40googlegroups.com.


Re: The cotent types framework unreasonably limits model name length.

2020-08-10 Thread Richard Campen
I guess I have two answers to that:

1) Specifically, in this instance I am scripting the creation of a whole 
bunch of Django models as there are too many to do manually. A couple out 
of the hundred or so models have names that are just over 100 characters 
(102, 103, etc) which is where I found this limit.

2) More generally, why should Django impose any kind of limit at all on the 
model length? If python doesn't impose a limit on class names, and the db 
backend doesn't limit it, (and even the Django ORM doesn't limit it) why 
should a contrib package like content types limit it? Also to preempt the 
question, yes I need content types as it is required by other things 
running in the application.

Side note: If Django truly wishes to limit the Model Name length, doing so 
directly would be more appropriate in the model metaclass, rather than as a 
side effect of a content types.

Cheers
R


On Tuesday, 11 August 2020 15:19:00 UTC+12, Uri wrote:
>
> How can a class name be more than 100 characters? Can you give an example?
>
> A limit of 100 characters seems reasonable to me, maybe even 60 would be 
> enough.
>
> אורי
> u...@speedy.net 
>
>
> On Tue, Aug 11, 2020 at 6:06 AM Richard Campen  > wrote:
>
>> Hello
>>
>> I have hit what I feel is an arbitrary limit on the length of a django 
>> model class name. I am using the PostgreSQL backend, which smartly 
>> truncates table names above a certain size (normally 63 characters) which 
>> means in theory a table name can be of indeterminate length, as PostgreSQL 
>> will truncate it appropriately. However, if the model class name is greater 
>> than 100 characters than an error is thrown when saving the model name to 
>> the `django_content_type` model as the `ContentType.model` field uses a 
>> CharField with a limit of 100. This arbitrarily restricts the size of the 
>> model name when the db backend can handle it fine.
>>
>> I tried to go back in time to figure out if there was any context in 
>> setting the `ContentType.model` field max_length at 100 chars, but it was 
>> made before the Django project was migrated to git.
>>
>> I feel it would be best to switch this field to a TextField, as even 255 
>> characters seems an unreasonable limit to impose when the db backend can 
>> support longer names, though perhaps having a smaller (but configurable) 
>> max_length on the TextField would still be desirable.
>>
>> What are peoples feelings on this?
>>
>> Cheers,
>> Richard
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-d...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/26478a0a-5809-449f-b17d-d7223e2cfb3do%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/396d07c8-060d-4d35-98eb-e5bbea502a24o%40googlegroups.com.


Re: The cotent types framework unreasonably limits model name length.

2020-08-10 Thread Kye Russell
I’ve never needed a Django model with a name that long, but I don’t think
it’s the framework’s place to make those sorts of assumptions if it doesn’t
need to, especially for what I see as little to no gain.


On 11 August 2020 at 11:18:49 am, אורי (u...@speedy.net) wrote:

How can a class name be more than 100 characters? Can you give an example?

A limit of 100 characters seems reasonable to me, maybe even 60 would be
enough.

אורי
u...@speedy.net


On Tue, Aug 11, 2020 at 6:06 AM Richard Campen 
wrote:

> Hello
>
> I have hit what I feel is an arbitrary limit on the length of a django
> model class name. I am using the PostgreSQL backend, which smartly
> truncates table names above a certain size (normally 63 characters) which
> means in theory a table name can be of indeterminate length, as PostgreSQL
> will truncate it appropriately. However, if the model class name is greater
> than 100 characters than an error is thrown when saving the model name to
> the `django_content_type` model as the `ContentType.model` field uses a
> CharField with a limit of 100. This arbitrarily restricts the size of the
> model name when the db backend can handle it fine.
>
> I tried to go back in time to figure out if there was any context in
> setting the `ContentType.model` field max_length at 100 chars, but it was
> made before the Django project was migrated to git.
>
> I feel it would be best to switch this field to a TextField, as even 255
> characters seems an unreasonable limit to impose when the db backend can
> support longer names, though perhaps having a smaller (but configurable)
> max_length on the TextField would still be desirable.
>
> What are peoples feelings on this?
>
> Cheers,
> Richard
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/26478a0a-5809-449f-b17d-d7223e2cfb3do%40googlegroups.com
> 
> .
>
-- 
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/CABD5YeFdA95UhJex%2BERf1pM-groRiUjO5tyLv300wSRjcWkGSQ%40mail.gmail.com

.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANK-yknfid%3DcKToiWpnLm3Ky6xoCpXz15a-jeLJobtRgxtvj%3DA%40mail.gmail.com.


Re: The cotent types framework unreasonably limits model name length.

2020-08-10 Thread אורי
How can a class name be more than 100 characters? Can you give an example?

A limit of 100 characters seems reasonable to me, maybe even 60 would be
enough.

אורי
u...@speedy.net


On Tue, Aug 11, 2020 at 6:06 AM Richard Campen 
wrote:

> Hello
>
> I have hit what I feel is an arbitrary limit on the length of a django
> model class name. I am using the PostgreSQL backend, which smartly
> truncates table names above a certain size (normally 63 characters) which
> means in theory a table name can be of indeterminate length, as PostgreSQL
> will truncate it appropriately. However, if the model class name is greater
> than 100 characters than an error is thrown when saving the model name to
> the `django_content_type` model as the `ContentType.model` field uses a
> CharField with a limit of 100. This arbitrarily restricts the size of the
> model name when the db backend can handle it fine.
>
> I tried to go back in time to figure out if there was any context in
> setting the `ContentType.model` field max_length at 100 chars, but it was
> made before the Django project was migrated to git.
>
> I feel it would be best to switch this field to a TextField, as even 255
> characters seems an unreasonable limit to impose when the db backend can
> support longer names, though perhaps having a smaller (but configurable)
> max_length on the TextField would still be desirable.
>
> What are peoples feelings on this?
>
> Cheers,
> Richard
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/26478a0a-5809-449f-b17d-d7223e2cfb3do%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CABD5YeFdA95UhJex%2BERf1pM-groRiUjO5tyLv300wSRjcWkGSQ%40mail.gmail.com.


The cotent types framework unreasonably limits model name length.

2020-08-10 Thread Richard Campen
Hello

I have hit what I feel is an arbitrary limit on the length of a django 
model class name. I am using the PostgreSQL backend, which smartly 
truncates table names above a certain size (normally 63 characters) which 
means in theory a table name can be of indeterminate length, as PostgreSQL 
will truncate it appropriately. However, if the model class name is greater 
than 100 characters than an error is thrown when saving the model name to 
the `django_content_type` model as the `ContentType.model` field uses a 
CharField with a limit of 100. This arbitrarily restricts the size of the 
model name when the db backend can handle it fine.

I tried to go back in time to figure out if there was any context in 
setting the `ContentType.model` field max_length at 100 chars, but it was 
made before the Django project was migrated to git.

I feel it would be best to switch this field to a TextField, as even 255 
characters seems an unreasonable limit to impose when the db backend can 
support longer names, though perhaps having a smaller (but configurable) 
max_length on the TextField would still be desirable.

What are peoples feelings on this?

Cheers,
Richard

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/26478a0a-5809-449f-b17d-d7223e2cfb3do%40googlegroups.com.


Re: How to pass predicted variable to html webpage

2020-08-10 Thread Adam Johnson
Hi!

I think you've found the wrong mailing list for this post. This mailing
list is for discussing the development of Django itself, not for support
using Django. This means the discussions of bugs and features in Django
itself, rather than in your code using it. People on this list are unlikely
to answer your support query with their limited time and energy.

For support, please follow the "Getting Help" page:
https://docs.djangoproject.com/en/3.0/faq/help/ . This will help you find
people who are willing to support you, and to ask your question in a way
that makes it easy for them to answer.

Thanks for your understanding and all the best,

Adam

On Mon, 10 Aug 2020 at 14:53, Sukhwinder Singh 
wrote:

> How to pass predicted variable to html webpage
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/2be85103-e0d6-4d41-8b1c-9cf933553f79o%40googlegroups.com
> 
> .
>


-- 
Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM1hidy%3DgsVgkJ5Zk%3DvpsTV2p1sEG5JqVena6En95_8cXA%40mail.gmail.com.


How to pass predicted variable to html webpage

2020-08-10 Thread Sukhwinder Singh
How to pass predicted variable to html webpage

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2be85103-e0d6-4d41-8b1c-9cf933553f79o%40googlegroups.com.


Re: DJANGO activity log

2020-08-10 Thread Adam Johnson
Hi!

I think you've found the wrong mailing list for this post. This mailing
list is for discussing the development of Django itself, not for support
using Django. This means the discussions of bugs and features in Django
itself, rather than in your code using it. People on this list are unlikely
to answer your support query with their limited time and energy.

For support, please follow the "Getting Help" page:
https://docs.djangoproject.com/en/3.0/faq/help/ . This will help you find
people who are willing to support you, and to ask your question in a way
that makes it easy for them to answer.

Thanks for your understanding and all the best,

Adam

On Sun, 9 Aug 2020 at 22:53, Josh Raj  wrote:

> I want to record the users login and logout timings of users in django if
> anyone please suggest
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/8bf99378-153f-44b2-94a5-4b88297d9061o%40googlegroups.com
> 
> .
>


-- 
Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM26jdYZ72_gYYJG-u%3DCJaxs1LFqRnTKq%2B9nQkij9Y%2BMQQ%40mail.gmail.com.