Thursday, June 28, 2012

Re: locating the functionality behind the HTML element

On 06/27/2012 08:55 PM, Smaran Harihar wrote:
> Hi Guys,
> I am new to Django and have completed the initial basic tutorials in
> the django doc. I am presently working on a pre-customized
> django application. I was wondering how I can use FireBug to locate
> the code in a specific element (like button). In the sense, in general
> the web development once we are able to locate the button we are able
> to then locate the class of the specific element and JS attached to it
> and CSS. But in Django this cannot be done since everything is located
> in separate directories.
> Since I am entering into the Django code, where should I start looking
> for the CSS and JS files?

Hi Smaran,

You can install django-debug-toolbar. That will tell you which templates
are used to render a given page. You'll also see the whole template
inheritance hierarchy. Knowing the URL and those two bits of
information, you'll be able to mentally trace a request as it's handled
by, dispatched to a view function, which in turn feeds a
template. You can work forward from the URL or backward from the template.


Clifford Ilkay
1419-3230 Yonge St.
Toronto, ON
Canada M4N 3P6

+1 416-410-3326

You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment