Re: Ticket #34646 Ordering a Django admin column based on multiple model fields

2023-06-23 Thread Mubarak Alrashidi
I really hope the developers implement the patch.

On Monday, June 19, 2023 at 4:55:42 AM UTC+3 David Sanders wrote:

> Sorry to clarify I intended to respond with "niche solution" not "nice 
> solution" lol. I didn't realise the phone's autocomplete had done that.
>
> On Monday, 19 June 2023 at 11:05:41 UTC+10 David Sanders wrote:
>
>> Mariusz is a developer, so that's at least 1 developer's opinion :)
>>
>> Unless anybody else pipes up to counter this I'd consider it to be a nice 
>> solution.
>>
>> On Monday, 19 June 2023 at 05:01:52 UTC+10 Mubarak Alrashidi wrote:
>>
>>> Can we at least know what the developers think about it?
>>>
>>>
>>> On Sunday, June 11, 2023 at 1:28:58 AM UTC+3 Mubarak Alrashidi wrote:
>>>
 Hello,

 I posted this StackOverflow question 
 , and @Willem Van Onsem 
  
 tried 
 to help by opening a ticket numbered #34646 
 , and creating a patch 
 for supporting the order by multiple fields in admin.display decorator.

 But it got closed as a duplicate of #31975 
  which was reported about 
 3 years ago, and it got closed as wontfix by @Mariusz Felisiak 
  because he said: *"We don't want to add 
 unnecessary complexity to the API.".*

 And I agree with what @Petr Dlouhý 
 
  says: *"it is small modification of Django code and small increase in 
 API complexity (which is consistent with the logic of other order fields, 
 BTW)."**.*

 The inconsistency is when somewhere we're able to order by multiple 
 fields, and somewhere else we can't.

 If we can order by multiple fields in the modelAdmin classes, why can't 
 we do so in the admin.display decorator?

 So, I do hope to reconsider implementing the patch 
 
  that @Willem Van Onsem 
 
  created.

 Thanks

>>>

-- 
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/6fe718c4-9faa-44eb-b981-a6f720372cd9n%40googlegroups.com.


Re: Deploying Django under a sub-path

2023-06-23 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Arthur,

You've found the wrong mailing list for this thread. This mailing list is
for discussing the development of Django itself, not for support using
Django. I guess that's why no one replied.

If you would like to suggest a documentation change please do open a PR
with reference to the information you found.

Thanks,

Adam

On Fri, Jun 16, 2023 at 10:23 PM Arthur Pemberton  wrote:

> I found https://code.djangoproject.com/ticket/7930 seems like
> `FORCE_SCRIPT_NAME` just isn't meant to work.
>
> Maybe the docs should reflect that.
>
> Arthur Pemberton
>
> On Fri, Jun 16, 2023 at 5:18 PM Arthur Pemberton 
> wrote:
>
>> Even with  `FORCE_SCRIPT_NAME` `MEDIA_URL` is being prefixed properly,
>> but not `STATIC_URL` .
>>
>> Was `FORCE_SCRIPT_NAME` just not meant to be used with the `runserver` ?
>>
>> Arthur Pemberton
>>
>> On Fri, Jun 16, 2023 at 5:01 PM Arthur Pemberton 
>> wrote:
>>
>>> The docs reference `FORCE_SCRIPT_NAME` but say very little of how to use
>>> it.
>>>
>>> Reading through the code, I see very little use of `SCRIPT_NAME` itself,
>>> however as far as I can tell, use of `SCRIPT_NAME` is supposed to be how
>>> one deploys Django at a sub-path.
>>>
>>> I had to modify wsgi.py per
>>> https://ruddra.com/deploy-django-subpath-openshift/ to get things to
>>> work.
>>>
>>> Shouldn't this be a complete feature?
>>>
>>> I've re-checked https://docs.djangoproject.com/en/4.2/howto/deployment/
>>> and there's no information on the topic (that I could find).
>>>
>>> Arthur Pemberton
>>>
>> --
> 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/CA%2BX4dQSQDcaApgWFmEE8MRERKbdHBBPh4KXa12pTi9FHO7zx1g%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/CAMyDDM016eww3f5GBB1sPHJncf%2BWUHk7nLdQsf9ezUhJY0d9XQ%40mail.gmail.com.


Re: Deploying Django under a sub-path

2023-06-23 Thread Arthur Pemberton
I actually meant this as a developer question: as, at least in my review of
the code, and testing with `manage.py runserver`. use of `SCRIPT_NAME` has
no observable effect.

If that can be confirmed, then yes, the documentation should be updated,
and I can do a PR accordingly. Use of `SCRIPT_NAME` itself is not
documented anywhere; seems like it should at least be mentioned in the
Deployment section.

Arthur Pemberton

On Fri, Jun 23, 2023 at 3:07 PM 'Adam Johnson' via Django developers
(Contributions to Django itself)  wrote:

> Hi Arthur,
>
> You've found the wrong mailing list for this thread. This mailing list is
> for discussing the development of Django itself, not for support using
> Django. I guess that's why no one replied.
>
> If you would like to suggest a documentation change please do open a PR
> with reference to the information you found.
>
> Thanks,
>
> Adam
>
> On Fri, Jun 16, 2023 at 10:23 PM Arthur Pemberton 
> wrote:
>
>> I found https://code.djangoproject.com/ticket/7930 seems like
>> `FORCE_SCRIPT_NAME` just isn't meant to work.
>>
>> Maybe the docs should reflect that.
>>
>> Arthur Pemberton
>>
>> On Fri, Jun 16, 2023 at 5:18 PM Arthur Pemberton 
>> wrote:
>>
>>> Even with  `FORCE_SCRIPT_NAME` `MEDIA_URL` is being prefixed properly,
>>> but not `STATIC_URL` .
>>>
>>> Was `FORCE_SCRIPT_NAME` just not meant to be used with the `runserver` ?
>>>
>>> Arthur Pemberton
>>>
>>> On Fri, Jun 16, 2023 at 5:01 PM Arthur Pemberton 
>>> wrote:
>>>
 The docs reference `FORCE_SCRIPT_NAME` but say very little of how to
 use it.

 Reading through the code, I see very little use of `SCRIPT_NAME`
 itself, however as far as I can tell, use of `SCRIPT_NAME` is supposed to
 be how one deploys Django at a sub-path.

 I had to modify wsgi.py per
 https://ruddra.com/deploy-django-subpath-openshift/ to get things to
 work.

 Shouldn't this be a complete feature?

 I've re-checked https://docs.djangoproject.com/en/4.2/howto/deployment/
 and there's no information on the topic (that I could find).

 Arthur Pemberton

>>> --
>> 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/CA%2BX4dQSQDcaApgWFmEE8MRERKbdHBBPh4KXa12pTi9FHO7zx1g%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/CAMyDDM016eww3f5GBB1sPHJncf%2BWUHk7nLdQsf9ezUhJY0d9XQ%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/CA%2BX4dQQDEdkmuvFHrpcBKkQEeQ1aF6SNvuZ7Om1hAacEPx_jLg%40mail.gmail.com.