Optionally using a custom queryset for Paginator and MultipleObjectMixin (ListView)

2018-06-29 Thread Jakub Kleň
Hi guys, I came across a problem today while testing my webapp with a full migrations applied from my legacy site for the first time. The problem is I'm using Prefetch in my view query (get_queryset), and it works fine when I just fetch it, but the problem comes with the .count() query which

Re: New Feature discussion: making admin app & model url configurable

2018-06-29 Thread Ramez Ashraf
Taking it off from Collin's crucial suggestion https://github.com/django/django/pull/10111 Implement it as an AdminSite method, Which, after some thoughts, i think it's fair that if one wants to customize the admin urls, then they should sub class the AdminSite, Also i believe for developers

"Variables and attributes may not begin with underscores" error

2018-06-29 Thread Raffaele Salmaso
Hi, anyone knows the rationale for forbidding variables and attributes with an initial underscore in django templates? This limitation is here from day 0 https://github.com/django/django/blob/ed114e15106192b22ebb78ef5bf5bce72b419d13/django/core/template.py#L261 and docs doesn't mention it (or

Re: "Variables and attributes may not begin with underscores" error

2018-06-29 Thread Gregory Kaleka
The docs do mention it on the more complete template api page , though there isn't an explanation as to the reason. I would say it should at least be added to the template docs you link to. On Friday, June 29,

New Feature discussion: making admin app & model url configurable

2018-06-29 Thread Ramez Ashraf
Hello guys, I use the admin quite extensively in my work with Django, and it's awesome. One place that can use some polish is the urls. As you know, the admin urls evolve around are the / , and those two can get technical, long and in short not user friendly. Hence, I propose a new feature

Re: New Feature discussion: making admin app & model url configurable

2018-06-29 Thread Ramez Ashraf
Another comment, if i may, about the implementation after some thoughts 1- it does not customize the app_index url 2- as a consequence, the "uniformity" the admin urls may be broken So maybe there is a way, that this method `get_urls_for_model` get changed to include both the app_index, and the

Re: New Feature discussion: making admin app & model url configurable

2018-06-29 Thread Collin Anderson
Maybe we could make an AdminSite.get_urls_for_model(self, model, model_admin) https://github.com/django/django/pull/10108/files On Fri, Jun 29, 2018 at 8:57 AM wrote: > Personally, I'm not sure I see that much value. As I see it, the admin is > intended for technical users, not as a general

Re: New Feature discussion: making admin app & model url configurable

2018-06-29 Thread knyght
Personally, I'm not sure I see that much value. As I see it, the admin is intended for technical users, not as a general admin interface for end users (in this context I'm mostly talking about non-programmers). While it can and I sometimes do allow end-users to use the admin directly, I really

Re: New Feature discussion: making admin app & model url configurable

2018-06-29 Thread Ramez Ashraf
Sure that's a great idea Colin ! I'm little greedy, I wanted to make it little easier, ie without needing to subclass the AdminSite... But that's absolutely great implementation too! On Fri, Jun 29, 2018, 4:07 PM Collin Anderson wrote: > Maybe we could make an