【发布时间】:2010-11-09 06:44:32
【问题描述】:
我面临一个问题:我想在我的更改表单中提供一个链接,该链接将重定向到一个页面,该页面也可能是简单的 php 页面或任何页面,在该页面中我想执行一些数据库查询并显示它们。我也想在点击时传递 id。有可能吗?
在我的 view.py 中我写道:
from django.shortcuts import render_to_response
from django.template import RequestContext
def MyClass(self,id,request):
return render_to_response('admin/custom_change_form.html')#my template location
我的模型和管理文件很简单。
【问题讨论】:
标签: django django-admin django-urls