Reverse for 'personal_info' with arguments '('',)' not found. 1 pattern(s) tried: ['CetPersInfo/(?P<topic_id>\d+)$'] 我的url: from django.conf.urls import url from django.urls import path from cet46.views import
Reverse for 'home' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] 此问题出现的原因是我的文件中出现了{{% url 'home' %}}这样的语句,url配置错误了,因为我并没有在相应的url配置语句里面指定name值。 解决方法只需要在相应的url配置后面加上name='home'就可以...
def __unicode__(self): return self.question def was_published_recently(self): now=timezone.now() return now-datetime.timedelta(days=1) <= self.pub_date < now was_published_recently.admin_order_field = 'pub_date' was_published_recently.boolean = True was_published_recently.short_description...
1.如果存在无效的url配置(url对应的函数删除了等),会提示错误 2.注意添加好reverse的函数的路径,否则会出现: return HttpResponseRedirect(reverse('agentList')) Reverse for 'xxx' with arguments '()' and keyword arguments '{}' not found. 修改为: return HttpResponseRedirect(reverse('pms.agent.index.a...
一运行就成这样了: django.urls.exceptions.NoReverseMatch: Reverse for 'bb' with arguments '('',)' not found. 1 pattern(s) tried: ['boke0/bc/(?P<boke_id>[0-9]+)$']来源:8-3 Django模板中的超链接配置 元器 2019-10-09 23:33根URl代码: from django.contrib import admin from django....
2.注意添加好reverse的函数的路径,否则会出现: return HttpResponseRedirect(reverse('agentList')) Reverse for 'xxx' with arguments '()' and keyword arguments '{}' not found. 1. 修改为: return HttpResponseRedirect(reverse('pms.agent.index.agentList')) ...
If the URL accepts arguments, you may pass them inargs. For example: fromdjango.urlsimportreversedefmyview(request):returnHttpResponseRedirect(reverse('arch-summary',args=[1945])) You can also passkwargsinstead ofargs. For example: >>>reverse('admin:app_list',kwargs={'app_label':'auth'...
reverse conceal 颜色规格遵循以下模式之一: role=fg role=fg/bg role=fg,option,option role=fg/bg,option,option 其中role 是一个有效颜色角色的名称,fg 是前景色,bg 是背景色,每个 option 是颜色修改选项之一。然后用分号分隔多个颜色规范。例如: export DJANGO_COLORS="error=yellow/blue,blink;notice=magenta...
django.urls.exceptions.NoReverseMatch: Reverse for 'detail' with arguments '('',)' not found. 1 pattern(s) tried: ['article/(? P<pk>[0-9]+)/$'] 路由缺少参数,我这个问题是因为缓存没更新引起的。具体情况是,django 新模板代码 拿到旧的数据结构(因为是缓存数据-旧的数据结构,缓存时长 12H)去...
The arguments could be: * A model: the model's `get_absolute_url()` function will be called. * A view name, possibly with arguments: `urls.reverse()` will be used to reverse-resolve the name. * A URL, which will be used as-is for the redirect location. Issues a temporary redirec...