﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21528	improve Django Doc with an example for formfield_for_foreignkey accessing parent ID	anonymous	Caio Ariede	"Please,
Could you add an example for formfield_for_foreignkey (
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_for_foreignkey) showing how to access parent ID for filtering a foreignkey.

I saw on http://www.stereoplex.com/blog/filtering-dropdown-lists-in-the-django-admin
{{{
parent_id = request.META['PATH_INFO'].strip('/').split('/')[-1]
}}}
Clearly it's not ideal.

Thanks!"	Cleanup/optimization	closed	Documentation	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
