Re: Redirect type selection in django.contrib.redirects

2022-01-09 Thread Niccolò Mineo
I'd be happy to help and improve this part of Django, but I need some 
feedback from your side on the proposal above (and also how to improve it) 
to open a proper PR. Can you please give some?
Il giorno giovedì 21 ottobre 2021 alle 08:58:06 UTC+2 Niccolò Mineo ha 
scritto:

> Ex.
>
> if self.response_gone_class != HttpResponseGone and r.new_path == '':
> return self.response_gone_class()
> if self.response_redirect_class != HttpResponsePermanentRedirect:
> return self.response_redirect_class(r.new_path)
> return HttpResponse(status_code=r.redirect_type, new_path=r.new_path)
>
> Il giorno giovedì 21 ottobre 2021 alle 08:56:44 UTC+2 Niccolò Mineo ha 
> scritto:
>
>> Elaborating on the original proposal to make it backwards compatible, I 
>> was thinking along the lines of checking in the middleware whether the 
>> response_redirect_class attribute is set with the default class and, if 
>> it is, making it use the Model's redirect_type field. For 410 status 
>> codes, the response_gone_class would be the attribute to check, of 
>> course.
>>
>> Il giorno sabato 16 ottobre 2021 alle 23:50:26 UTC+2 Niccolò Mineo ha 
>> scritto:
>>
>>> I just opened a ticket with the related PR: 
>>> https://code.djangoproject.com/ticket/33206
>>>
>>> Il giorno mercoledì 6 ottobre 2021 alle 23:55:51 UTC+2 Adam Johnson ha 
>>> scritto:
>>>
 This seems like a reasonable addition to me.

 On Fri, 24 Sept 2021 at 08:08, Niccolò Mineo  
 wrote:

> Hi. The marketing guys at my workplace asked for the ability to 
> customise the redirect type  (301, 302) when creating redirects in the 
> admin and I shipped this change a while ago. I believe this could be a 
> nice 
> addition to Django itself, too. What do you think?
>
>
>
>
> -- 
> 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-develop...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/0ccdfe91-c97a-4363-9226-518310ceca04n%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/1ad13f10-ea21-4d6e-b502-ea51bdfec48dn%40googlegroups.com.


Contribution request

2022-01-09 Thread Utkarsh Luthra
Hi everyone,

First and foremost, my warm greeting to the community and whosoever reads 
this.

I have been using Django for quite some time for development purposes and 
would love to contribute o it in whatever ways possible. If there is an 
issue/ticket which I can start working on kindly let me know alongside.

I looked at the tickets on the development website but I guess I would 
first like to work alongside someone by assisting them with whatever 
possible with a thorough understanding of Python, JavaScript, and C++, and 
experience in Django.

With warm regards,

Yours, sincerely
Utkarsh Luthra

-- 
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/52ea-fcfc-4eb2-9523-99051bacaf3bn%40googlegroups.com.