我的models.py:from django.contrib.auth.models import User
class SkillCategory但是,如果我查看Django调试工具栏,我会发现对于每个Skill,Django都在查询db以获取Category。我正在UserProfile对象上使用UserProfile,但它不影响查询的数量。当然,肯定有更好的方法,这样Django可以一次获得所有的S
用户可以创建post,而post必须属于1组。用户Samir写了一篇关于足球的文章。这个职位属于团体体育。在django管理中,post中的组也是空白的。braces.views import SelectRelatedMixin
model = Post
select_relatedP<slug>[-\w]+)/$', views.PostDetail.as_view(),