Hi all,
I'm new to Django, started out with 0.96 and very soon switched to 1.0
version. Here, I'm facing the following problem.
My Admin index page needs to have a small custom form snippet in
addition to all other usual things. It will be accommodated in the
admin_index page as follows:
{% block reportblock %}
<div class="module">
<table summary="Reports available" width="100%">
<caption>Reports</caption>
<tr>
<td>
<table>{{ reportform.as_table }}</table>
<p><input type="button" value="Get" onclick="return
get_report
('{{ base_url }}');"></p>
</td>
</tr>
</table>
</div>
{% endblock %}
The above snippet depends on the variables 'reportform' and
'base_url'. I don't know whether it is intelligent or not, but my plan
is to define a form named ReportForm in the forms module and pass an
instance of it to the admin_index page. The base_url may be extracted
from request and passed in the same way.
How can I pass arguments to the admin_index page? It don't accept any
extra argument dictionary from urlConf. Or can the required data be
accessed directly from the template itself?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---