Re: [Django] #22007: Mixed import styles (possible OCD on my part)

2014-02-16 Thread Django
#22007: Mixed import styles (possible OCD on my part)
-+-
 Reporter:  kinjal.dixit@…   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Documentation|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  import module,   |  Unreviewed
  import script  |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-

Comment (by aaugustin):

 Yes, it'd be nice to recommend a consistent import style.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/080.83d16c05213e8abd05598dd88940d315%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #22007: Mixed import styles (possible OCD on my part)

2014-02-16 Thread Django
#22007: Mixed import styles (possible OCD on my part)
-+-
 Reporter:  kinjal.dixit@…   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Documentation|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  import module,   |  Unreviewed
  import script  |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  1|
-+-
Changes (by AeroNotix):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Is this really a big deal?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/080.c90565c1eac2001aa163f2fed20964ca%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Django] #22007: Mixed import styles (possible OCD on my part)

2014-02-10 Thread Django
#22007: Mixed import styles (possible OCD on my part)
-+-
 Reporter:  kinjal.dixit@…   |  Owner:  nobody
 Type:   | Status:  new
  Cleanup/optimization   |Version:  1.6
Component:  Documentation|   Keywords:  import module, import
 Severity:  Normal   |  script
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  1|  UI/UX:  0
-+-
 I am getting thrown by the documentation
 (https://docs.djangoproject.com/en/1.6/topics/class-based-views/intro
 /#using-class-based-views), when they give this example:

 from django.http import HttpResponse
 from django.views.generic.base import View

 class MyView(View):
 def get(self, request):
 # 
 return HttpResponse('result')

 For the first import, they are specifying only the folder names and
 omitting the actual python script which contains the definition of `class
 HttpResponse`, which is `response.py`.  Here they are relying on the
 `__init__.py` to work.

 For the second import, they are not relying on the `__init__.py` and going
 all the way to specify the python script in which the `class View` is
 defined, which is `base.py`.

 If the first way is preferred, then the second import should be written
 as:

 from django.views.generic import View

 If the second way is preferred, then the first import should be written
 as:

 from django.http.request import HttpRequest

 I know that both are acceptable.  I am just wondering why both are being
 used and not just one style.  I think this is important because this will
 be what people will be writing in the code.

 I would very much love to see this (and other occurrences of this) to be
 identified and cleaned up.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.8cc820e5befef7a9dbc752fed946135e%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.