Re: Issues and Improvements to the The Django Administration

2020-12-15 Thread Muskan Vaswan
The point is that there is a way, in fact multiple ways that this could be implemented without changing the models. A change to the method I suggested in my last mail would be to avoid looping over the query set at all or even the Entry() class and using values and the the Count() annotation in

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread James Bennett
On Tue, Dec 15, 2020 at 6:07 PM Diptesh Choudhuri wrote: > Instead of removing the default test runner altogether, I can work on adding > a TESTING_BACKEND variable in settings.py with possible values being > 'django.testing.backends.pytest' (default) or > 'django.testing.backends.DefaultRunner

Re: Issues and Improvements to the The Django Administration

2020-12-15 Thread Akshat Sharma
Hi Well I am an webdevloper and pretty new to the django so but If the issue is only to make log more efficient and useful then we can implement javascript into the admin site it can be resolved with pretty simple js and can be directly implemented into HTML and can be a major advantage in scali

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Diptesh Choudhuri
I understand what you mean. Here's a proposal. Instead of removing the default test runner altogether, I can work on adding a *TESTING_BACKEND *variable in *settings.py *with possible values being *'django.testing.backends.pytest' *(default) or *'django.testing.backends.DefaultRunner'*. This wa

Re: Issues and Improvements to the The Django Administration

2020-12-15 Thread Carles Pina i Estany
Hi, On Dec/16/2020, Muskan Vaswan wrote: > LogEntry which are used in the templates already. Note that this is the > most basic draft just to give an idea of what I’m trying to say. About > having 1000 rows, we will have to reach a consensus to put an upper limit > to the number of rows that ca

Re: Issues and Improvements to the The Django Administration

2020-12-15 Thread Muskan Vaswan
1. Agreeably this won’t be easy but I might have a way of doing this without having to make changes to the data model. We can leave the data model as it is but manipulate the context that we give to by changing the simple query (Line 16

Re: Issues and Improvements to the The Django Administration

2020-12-15 Thread Adam Johnson
> > I would suggest something like 50 or 100. Let me know what you think, and > if I made any sense at all But in this case, we might show something like "User X deleted 50 rows", when really they deleted 1000. I don't think we'd want to show such an inaccurate message. If you want though, you

Re: Issues and Improvements to the The Django Administration

2020-12-15 Thread Muskan Vaswan
1. Agreeably this won’t be easy but I might have a way of doing this without having to make changes to the data model. We can leave the data model as it is but manipulate the context that we give to by changing the simple query (Line 16

Re: Issues and Improvements to the The Django Administration

2020-12-15 Thread Muskan Vaswan
[image: WhatsApp Image 2020-12-15 at 10.55.37 PM.jpeg] On Wednesday, 16 December 2020 at 00:12:40 UTC+5:30 Muskan Vaswan wrote: > I have the following suggestions and issues with the Django site > administration: > > 1. When deleting or adding items in Bulk (especially deleting), The Recent > A

Issues and Improvements to the The Django Administration

2020-12-15 Thread Muskan Vaswan
I have the following suggestions and issues with the Django site administration: 1. When deleting or adding items in Bulk (especially deleting), The Recent Actions should show “Deleted 15 Items” rather than every deleted item singularly which just occupies space and doesn't make a lot of sense

Re: ARe: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Adam Johnson
> > except the first one- this can be easily solved using a pytest hook It's not easy at all. I tried 4 years ago and failed to find a satisfactory way of running the checks at the appropriate time since the pytest lifecycle (db setup, reporting, etc.) is so different from unittest: https://githu

ARe: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Diptesh Choudhuri
*Adam,* Thanks for your detailed feedback. I will be honest, I couldn't understand any of the points you mentioned (except the first one- this can be easily solved using a pytest hook). As you said, these are very rare cases indeed. As a django and pytest user for some time, I would have encount

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Diptesh Choudhuri
> A case could be made along the same lines as was made for South. Could you please elaborate a bit on this? Maybe provide the relevant tickets? I am quite new to this community. Thanks! Best Diptesh On Tuesday, December 15, 2020 at 10:01:03 PM UTC+5:30 arvind...@gmail.com wrote: > A case cou

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Diptesh Choudhuri
> I agree with René and Adam, pytest and pytest-django already exist, and I don't see why we should copy it to Django or change the default test runner. I am not talking about replicating any code-base whatsoever. What I am proposing instead is official django support for pytest. Kind of like how

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Arvind Nedumaran
A case could be made along the same lines as was made for South. Get Outlook for Android From: django-developers@googlegroups.com on behalf of Mariusz Felisiak Sent: Tuesday, December 15, 2020 9:58:56 PM To: Django developers (Contributio

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Mariusz Felisiak
Hi, I agree with René and Adam, pytest and pytest-django already exist, and I don't see why we should copy it to Django or change the default test runner. Best, Mariusz -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Djan

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Diptesh Choudhuri
*Ahmad*, thanks for your views! Here's what I think. > I personally believe it should be in core because a lot of custom features we'd like to add to the test runner already exist in pytest's rich ecosystem. Just as Tom mentioned, adding timings was a lot harder than expected while such a featu

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Adam Johnson
Hi Whilst I appreciate the effort and love pytest, I don't think this it's feasible at the moment to even suggest to users that they use pytest, let alone make it a default or port Django's unittest-based framework. For a first step, we have our backwards compatibility policy. Any move away from

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Diptesh Choudhuri
Thank you everyone for your inputs! I don't know how you all are using the quote feature, so I will address you all by your names. - *Jacob*: Thank you for your support! The ticket you linked to is very helpful. It is upside of 5 years old. *pytest *has evolved a lot over that time, a

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Ahmad A. Hussein
Hi Diptesh, This is a great idea! (And one that has had a fair bit of discussion). I don't think anyone holds an opinion against supporting pytest as a testing tool, but I believe the main hurdle is laying a convincing argument why this support should be in Django Core versus remaining in its curr

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread René Fleschenberg
Hi, On 15.12.20 15:48, Tobias Bengfort wrote: My issue is mostly that pytest uses a lot of magic that is hard to debug, e.g. the overwritten assert statement or implicit injection of fixtures. Most pro arguments seem to depend on personal taste. It should be noted that you can use pytest / py

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Tom Forbes
I would be very much in favour of this. The developer experience of pytest is far better than the unittest module, the tests look more Pythonic and there is a lot more of an ecosystem we can tap into. There was some recent work done about adding timings to the Djanfo test suite as part of the m

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Tobias Bengfort
Hi Diptesh, I think it is great that you want to work on this. I also think asking for feedback now is the right way to go. That said, I personall have not had the best experience with pytest. I have mostly worked on smaller projects though, so my perspective might be very limited. My issu

Re: Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Jacob Rief
There is already a ticket for this: https://code.djangoproject.com/ticket/25707 I'm actually very much in favor of switching to pytest. In my newer projects I use pytest exclusively. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions

Replace the default django test runner to a more robust testing framework (like pytest)

2020-12-15 Thread Diptesh Choudhuri
Though the django default runner gets the job done, I think its high time to leverage the power of dedicated frameworks for testing django apps. I will take up the case of *pytest* here because other frameworks like *nose * are not widely used. For everyone who has used pytest for testing in dja

Fellow Reports -- December 2020

2020-12-15 Thread Carlton Gibson
Hi all. Calendar Week 49 -- ending 06 December. Triaged: https://code.djangoproject.com/ticket/32240 -- ConnectionAbortedError should be treated as a broken pipe error in the development server (Accepted) Reviewed: https://github.com/django/django/pull/13746 -- Added note about importin