Introduction : Somesh Chaturvedi

2017-12-21 Thread Somesh Chaturvedi
Hi everyone,

I have been using Django in my professional as well as personal projects 
for the past 3 years now. I'd like to start contributing for Django now. I 
have gone through the following documentation along with all its sub-docs. 

https://docs.djangoproject.com/en/dev/internals/contributing/

I would really appreciate if someone helps me with a head start. Thanks.

Regards,
Somesh Chaturvedi

-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/0aeb1738-a3b8-438f-a042-d1b150268806%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Introduction : Somesh Chaturvedi

2017-12-21 Thread Adam Johnson
Welcome Somesh,

There's actually a mailing list dedicated to first time contributors, where
you might get a bit more attention: https://groups.google.com/forum/#!forum/
django-core-mentorship

I'd suggest having a particular goal in mind where you'd like to contribute
- what areas of Django do you want to see improved? Also have a look
through the ticket tracker for a easy-pickings ticket to get involved in
the contribution process.

Also don't forget there are many more ways to contribute to Django than
just code, for example: helping a local community event, translating Django
or the docs, improving the docs, writing blog posts, contributing to one of
the many third party packages, or answering questions on Stack Overflow :)
:)

Adam

On 21 December 2017 at 10:58, Somesh Chaturvedi 
wrote:

> Hi everyone,
>
> I have been using Django in my professional as well as personal projects
> for the past 3 years now. I'd like to start contributing for Django now. I
> have gone through the following documentation along with all its sub-docs.
>
> https://docs.djangoproject.com/en/dev/internals/contributing/
>
> I would really appreciate if someone helps me with a head start. Thanks.
>
> Regards,
> Somesh Chaturvedi
>
> --
> 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 post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/django-developers/0aeb1738-a3b8-438f-a042-d1b150268806%
> 40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM3fNqh9hzjHo6EzHY6Viiu7sTKU9uynVJgodr%3DxE5g_jw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Introduction : Somesh Chaturvedi

2017-12-21 Thread Somesh Chaturvedi
Sounds good. I'll join the group right away and look at all other 
possible ways of contribution you have mentioned. Thanks, Adam.

On Thursday, December 21, 2017 at 6:13:07 PM UTC+5:30, Somesh Chaturvedi 
wrote:
>
> Hi everyone,
>
> I have been using Django in my professional as well as personal projects 
> for the past 3 years now. I'd like to start contributing for Django now. I 
> have gone through the following documentation along with all its sub-docs. 
>
> https://docs.djangoproject.com/en/dev/internals/contributing/
>
> I would really appreciate if someone helps me with a head start. Thanks.
>
> Regards,
> Somesh Chaturvedi
>
>

-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2ff20cb1-d5cd-4f7d-b6b1-d991abaa84ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Possible bug in django.contrib.auth.forms.UserChangeForm's password field's help_text setup

2017-12-21 Thread Shaheed Haque
Hi,

In Django 2.0, the help_text for the password field of 
django.contrib.auth.forms.UserChangeForm looks like this:

help_text=_(
"Raw passwords are not stored, so there is no way to see this "
"user's password, but you can change the password using "
"this form."
),

where the curly brackets are dealt with i nthe __init__() like this:

self.fields['password'].help_text = 
self.fields['password'].help_text.format('../password/')

As far as I can see, this works just fine when the form is used as-is when 
logging in to the admin site. However, the hardcoded path "../password/" 
breaks in other contexts. In such other places, I see that doing this 
resolves the issue that ../password does not point to the right place:

from ... import reverse
self.fields['password'].help_text = 
self.fields['password'].help_text.format(reverse('password_change'))

I have checked, and my 
/usr/local/lib/python3.6/dist-packages/django/contrib/auth/urls.py does use 
the name implied here, so as far as I can see, it ought to be a safe fix. 
However, I am not familiar enough with Django to be sure of that (or indeed 
if this use case constitutes a bug), so am posting here for advice before 
opening a defect. Please advise if a defect is warranted/desired.

Thanks, Shaheed


-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/bf198a95-8e63-4885-8988-b4bf02cc6a3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Forms in django.contrib.auth have "username" as a hardcoded field value (patch included)

2017-12-21 Thread Shaheed Haque
Hi,

There is a rather old defect https://code.djangoproject.com/ticket/19394 
relating to the topic in hand, i.e. the use of the django.contrib.auth 
forms as-is when the default User model has been overridden such that the 
username is not used. It was closed by adding a documentation update after 
some discussion where it was understood that an actual code fix might be 
rather tricky.

I've been playing a little with this, and observed that this small change 
to Django 2.0:


$ diff -U3 
/usr/local/lib/python3.6/dist-packages/django/contrib/admin/templates/admin/login.html
 
templates/registration/login.html
--- 
/usr/local/lib/python3.6/dist-packages/django/contrib/admin/templates/admin/login.html
  
2017-12-15 10:16:27.859911680 +
+++ templates/registration/login.html   2017-12-21 15:50:22.071558380 +
@@ -35,7 +35,7 @@
 {% if user.is_authenticated %}
 
 {% blocktrans trimmed %}
-You are authenticated as {{ username }}, but are not authorized to
+You are authenticated as {{ user }}, but are not authorized to
 access this page. Would you like to login to a different account?
 {% endblocktrans %}
 


seems enough to make things work for me. Without the fix, the template 
variable expands to the empty string; with the fix it expands to 
"f...@bar.com" as I expect. I'm rather new to Django, but IIUC, the fix 
works by replacing the explicit dependence on "username" with the str() of 
"user" (which calls get_username() and so honours the setting of 
USERNAME_FIELD in the replacement User model). Unless I've missed some 
other corner case, this appears to me to be a complete fix for the issue.

Please consider applying the above patch.

If needed, I could reopen the old defect, or start a new one. Please advise 
if that is the preferred approach.

Thanks, Shaheed

-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/b673da95-6161-436c-9dc9-2cad3c555020%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.