Django LBForum模板语法

2024-06-17 12:05:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用virtualenv、django 1.3.1和LBForum(0.9.22)cms

我需要帮助如何改正错误?你知道吗

提前谢谢

模板错误 在template/root/Dev/LBForum/ghlbforum/LBForum/templates/LBForum/inc中_标题.html,第5行错误

呈现时捕获到NoReverseMatch:找不到参数为“()”且关键字参数为“{}”的“lbforum\u index”的反向。 ![错误页][1] ![错误页][2]


Tags: djangodev模板标题参数virtualenvcmshtml
2条回答
yes, i use

urls.py file

from django.conf.urls.defaults import patterns, include, url

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^attachments/', include('attachments.urls')),
    (r'^', include('lbforum.urls')),
    # Examples:
    # url(r'^$', 'ghlbforum.views.home', name='home'),
    # url(r'^ghlbforum/', include('ghlbforum.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)

您是否在项目的主URL文件中包含LBForum URL?你知道吗

https://github.com/vicalloy/LBForum#id7

(r'^attachments/', include('attachments.urls')),
(r'^', include('lbforum.urls')),

当中没有具有匹配标记的URL模式时,将引发NoReverseMatch错误网址.py文件

相关问题 更多 >