import datetime .............. now = datetime.datetime.now()
вышыбает ошибку
'builtin_function_or_method' object has no attribute 'datetime'
подскажите пож-ста в чем проблема?
Спасибо большое!
import datetime .............. now = datetime.datetime.now()
'builtin_function_or_method' object has no attribute 'datetime'
from datetime import datetime now = datetime.now
./manage shell
now = datetime.datetime.now()
from mysite import settings from mysite.foo.decorstors import staff_member_required from django.shortcuts import get_object_or_404, render_to_response, Httpresponse from django.views.decorator.cache import never_cache from django import template from django.db import models from mysite.foo.models import * import datetime from Sybase import * import pytils from xlwt import *
import datetime
.................. mysite.foo.models, ................... mysite.foo.decorstors, ..................
__all__ = ['SampleModel', 'AnotherSampleModel', 'WowModel']
from mysite.foo.models import *
from mysite.foo.models import SampleModel, AnotherSampleModel, WowModel
Python documentation. 6.12 The import statement
The public names defined by a module are determined by checking the module's namespace for a variable named __all__; if defined, it must be a sequence of strings which are names defined or imported by that module. The names given in __all__ are all considered public and are required to exist. If __all__ is not defined, the set of public names includes all names found in the module's namespace which do not begin with an underscore character (“_”). __all__ should contain the entire public API. It is intended to avoid accidentally exporting items that are not part of the API (such as library modules which were imported and used within the module).
import datetime