简体   繁体   English

我正在尝试使用python在ubuntu上安装django = 1.9,并且在管理员登录时遇到以下错误

[英]I'm trying to install django=1.9 on ubuntu using python and I'm getting the following errors for admin login

django error displayed on terminal: 在终端上显示的django错误:

Not Found: /favicon.ico [21/Apr/2017 07:33:24] 
"GET /favicon.ico HTTP/1.1" 404 1963
Not Found: /favicon.ico [21/Apr/2017 07:33:25] 
"GET /favicon.ico HTTP/1.1" 404 1963 [21/Apr/2017 07:34:23] 
"GET /admin/ HTTP/1.1" 302 0
Internal Server Error: /admin/login/
Traceback (most recent call last):
File "/home/priya/.local/lib/python3.5/site-packages/django/template 
/utils.py", line 65, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/priya/.local/lib/python3.5/site-
packages/django/template/backends/django.py", line 126, in 
get_package_libraries

And this is the error message displayed on Browser: 这是浏览器上显示的错误消息:

InvalidTemplateLibrary at /admin/login/ 位于/ admin / login /的InvalidTemplateLibrary

Invalid template library specified. ImportError raised when trying to load 
'django.templatetags.future': cannot import name 'RemovedInDjango110Warning'

  Request Method:   GET
  Request URL:  http://localhost:8000/admin/login/?next=/admin/
  Django Version:   1.11 

I have installed django=1.9 version and it's showing 1.11 我已经安装了django = 1.9版本,显示为1.11

  Exception Type:   InvalidTemplateLibrary
  Exception Value:  

  Invalid template library specified. ImportError raised when trying to load 
  'django.templatetags.future': cannot import name 
  'RemovedInDjango110Warning'

   Exception Location:  /home/priya/.local/lib/python3.5/site-
   packages/django/template/backends/django.py in get_package_libraries, 
    line 130
   Python Executable:   /usr/bin/python3
   Python Version:  3.5.2
   Python Path:     

 ['/home/priya/Desktop/project/project',
 '/usr/lib/python35.zip',
 '/usr/lib/python3.5',
 '/usr/lib/python3.5/plat-i386-linux-gnu',
 '/usr/lib/python3.5/lib-dynload',
'/home/priya/.local/lib/python3.5/site-packages',
'/usr/local/lib/python3.5/dist-packages',
 '/usr/lib/python3/dist-packages']

url is removed from future template lib in django 1.9, so if you try to import in your templates like: {% load url from future %} it will give import error. django 1.9中的url已从future模板库中删除,因此,如果您尝试导入模板,例如: {% load url from future %} ,则会出现导入错误。 If url is needed in your template, just use it and delete the import. 如果模板中需要url ,请使用它并删除导入。

https://docs.djangoproject.com/en/1.11/releases/1.9/#features-removed-in-1-9 https://docs.djangoproject.com/en/1.11/releases/1.9/#features-removed-in-1-9

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用PyInstaller时出现以下错误:OSError:[Errno 2]没有这样的文件或目录。 我正在使用Ubuntu 15.04和Python 2.7 - I'm getting the following error while using PyInstaller: OSError: [Errno 2] No such file or directory. I'm using Ubuntu 15.04 and Python 2.7 我正在尝试在 python 中使用 HTML img 标签发送邮件,但出现以下错误 - I'm trying to use HTML img tag in python to send a mail, but I'm getting the following error 我正在尝试从一行中定位列索引,但不断收到错误,我是使用 Pandas 的新手 - I'm trying to locate the column index from a row but keep getting errors, i'm new to using pandas 我正在尝试使用 windows 批处理文件来运行 python 代码,但是我遇到了以下错误: - I'm trying to use a windows batch file to run python code, however I am encountering the following errors: 我正在尝试为 spacy 安装 en 但它给出了以下错误 - I'm trying to install en for spacy but it gives the following error 我正在尝试与django进行实时聊天并绕轨道飞行,但我不断收到错误消息 - I'm trying to make a live chat with django and orbited but I keep getting errors 我正在尝试使用 Python 读取域名的 IP 地址,但我遇到了奇怪的错误,我不太明白 - I'm trying to read the IP address for a domain name with Python and I'm getting strange errors I don't quite understand 我正在尝试在虚拟环境中安装 django 但出现一些错误,我不明白它是怎么回事 - I'm trying to install django in virtual environment but getting some error and I don't understand what is it about 我正在尝试使用python实现strassen的算法,但出现错误 - I'm trying to implement strassen's algorithm using python and I'm getting a error 我正在尝试在 ubuntu 上的崇高文本中使用 python 上的 tkinter 但我一直收到错误 - I'm trying to use tkinter on python in sublime text on ubuntu but i keep getting a error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM