virtualenv - Why import error while using django-templated-email? -


i trying use bradwhittington django-templated-email. installed it, , added following lines in settings.py.

from templated_email.backends.vanilla_django import templatebackend templated_email_backend = templatebackend 

when try run server, import error. when use

from templated_email import send_templated_mail 

in models.py again import error. new django, , googled answer many times. no luck. missing? 'run' window on pycharm shows following:

"c:\program files\jetbrains\pycharm 4.0.4\bin\runnerw.exe" "e:\***\***\***\env1\scripts\python.exe" "c:\program files\jetbrains\pycharm 4.0.4\helpers\pycharm\django_manage.py" syncdb "e:/***/***/***/***" traceback (most recent call last):   file "c:\program files\jetbrains\pycharm 4.0.4\helpers\pycharm\django_manage.py", line 41, in <module>     run_module(manage_file, none, '__main__', true)   file "c:\python34\lib\runpy.py", line 182, in run_module     return _run_module_code(code, init_globals, run_name, mod_spec)   file "c:\python34\lib\runpy.py", line 96, in _run_module_code     mod_name, mod_spec, pkg_name, script_name)   file "c:\python34\lib\runpy.py", line 85, in _run_code     exec(code, run_globals)   file "e:/***/***/***/***\manage.py", line 10, in <module>     execute_from_command_line(sys.argv)   file "e:\***\***\***\env1\lib\site-packages\django\core\management\__init__.py", line 385, in execute_from_command_line     utility.execute()   file "e:\***\***\***\env1\lib\site-packages\django\core\management\__init__.py", line 345, in execute     settings.installed_apps   file "e:\***\***\***\env1\lib\site-packages\django\conf\__init__.py", line 46, in __getattr__     self._setup(name)   file "e:\***\***\***\env1\lib\site-packages\django\conf\__init__.py", line 42, in _setup     self._wrapped = settings(settings_module)   file "e:\***\***\***\env1\lib\site-packages\django\conf\__init__.py", line 94, in __init__     mod = importlib.import_module(self.settings_module)   file "e:\***\***\***\env1\lib\importlib\__init__.py", line 109, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   file "<frozen importlib._bootstrap>", line 2254, in _gcd_import   file "<frozen importlib._bootstrap>", line 2237, in _find_and_load   file "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked   file "<frozen importlib._bootstrap>", line 1200, in _load_unlocked   file "<frozen importlib._bootstrap>", line 1129, in _exec   file "<frozen importlib._bootstrap>", line 1471, in exec_module   file "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed   file "e:/***/***/***/***\***\settings.py", line 17, in <module>     templated_email.backends.vanilla_django import templatebackend   file "e:\***\***\***\env1\lib\site-packages\templated_email\__init__.py", line 23     except importerror, e:                       ^ syntaxerror: invalid syntax  process finished exit code 1 

i using virtual environment. please me.

django-templated-email not support python 3, using. can migrate project python2, it's better find modern alternative django-templated-email.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -