Brent Hagany wrote:
> The issue of making shortcuts better (and decreasing the number of
> imports in views.py files) was brought up at DjangoCon

Another angle on the issue of reducing imports is that we can do it not 
with shortcuts only but by packing some smaller modules into larger 
ones. For example just yesterday I've stumbled upon this in my views:

     from django.views.decorators.http import require_POST, condition
     from django.http import HttpResponse, HttpResponseRedirect, \
         HttpResponseForbidden, HttpResponseBadRequest, Http404

And thought that it would be way better to merge both modules into a 
django.http and then I could just

     from django import http

and use everything in it with just a 5-letter prefix.

What people think about it?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to