Imagine situation:
I have view directory with tons of different views. all views have about 6 lines with imports - in the beginning of the file. it's pretty damn hard copy paste those 6 lines every time I create new view.
I usually using all those imports.
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required, user_passes_test
from django.core.files.base import ContentFile
from django.core.urlresolvers import reverse
from django.core import paginator
from django.db import connection
from django.db.models import Q
from django.http import HttpResponseRedirect, Http404, HttpResponse, HttpResponseForbidden
from django.shortcuts import render_to_response, get_object_or_404
from django.template import loader, Context, RequestContext
from django.utils.translation import ugettext as _
things like that..
SO QUESTION IS:
HOW to move all those imports to standalone file, so that I could include that file in every view i create. instead of tones imports I would have one file with imports for all views. I don't think that this would kill perfomance of application or smtng. I would use that file just for most common imports or smtng like that.. maybe it's damn php logic still with me, I know that includes in python is bad practise.. but I need a workaround for this situation.. it's getting on my nerves