我正在关注一个关于 Django 的教程,但我被卡住了,所以我搜索了另一个又一个,然后我遇到了重新安装我的 Linux 系统 x6 的情况(由于 ~/.bashrc 中的 Python 更改和类似的事情)
我是新来的,我是 Python 和 Django 的新手(初级)。仍在学习,但我有在 NCR 等各种公司工作的经验(8 年)......以及作为自由职业者的其他公司,在那里我学到了很多系统管理/后端的东西。
关键是:另一个教程中的所有突然(同时我相信 PYCHARM 有更新我无法提取创建的标签。
因此,在我的 base.html 中,pages.app 中的所有 .html 页面都在模板文件夹中,所有设置都在设置中......
但是,我的 {{ tags }} 没有出现!
这是一些信息,...我有同样的问题!
在模型中:
from django.http import HttpResponse
from django.shortcuts import render
from .models import *
from django import templatetags
from django import template
# Create your views here.
def home_view(request):
return render(request, "home.html", {})
def contact_view(request):
return render(request, "contact.html", {})
def about_view(request):
my_context:{
"my_text": "This is about us",
"my_number" : 123
}
return render(request, 'about.html', my_context)
def social_view(request):
return render(request, "social.html", {})
我在源文件夹中添加了所有设置 设置中的“模板目录”
请帮助我无法继续教程我想在初学者级别学习 DJANGO,就像我使用 Python重新安装Ubuntu的情况...
所以现在,这是最长的一段时间没有重新安装相同的操作系统,因为练习和学习 Python 和 Django ...... :(
from django.http import HttpResponse
from django.shortcuts import render
from .models import *
from django import templatetags
from django import template
# Create your views here.
def home_view(request):
return render(request, "home.html", {})
def contact_view(request):
return render(request, "contact.html", {})
def about_view(request):
my_context:{
"my_text": "This is about us",
"my_number" : 123
}
return render(request, 'about.html', my_context)
def social_view(request):
return render(request, "social.html", {})
请问,有什么想法吗?