unable to import function in django/python -
i writing django project follwing files:
ttam_container -utils.py -ttam -views.py codes within utils.py module:
def random_string(): ... def remove_blanks(): ... ...other functions... codes within views.py:
from utils import * def get_sequences(request): ... string = random_string() ... sequences = remove_blanks(sequences_with_blanks) ... the error global name remove_blanks' not defined reported. thought didn't import utils.py correcty in first place, random_string works...
any idea what's happening?
the import should be:
from utils import remove_blanks without .py
Comments
Post a Comment