* cc: reinout@… (added)
Comment:
I've looked at the 1.10 docs: the issue is still valid. There is some
documentation on where to place which templates, but no documentation on
the context that is available to the templates.
Would a simple pointer at the code suffice?
--
Ticket URL: <https://code.djangoproject.com/ticket/15059#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Caio Ariede (added)
Comment:
> Would a simple pointer at the code suffice?
I really think that this deserves better documentation, specially because
it's already been used by some pretty popular projects like django-
grappelli, django-jet at al.
I'd say having these documented will help us formalize that the context
sent to admin templates are stable and any changes should be stated in
release notes and docs.
Perhaps we could add the context for each template list in
[https://docs.djangoproject.com/en/dev/ref/contrib/admin/#templates-which-
may-be-overridden-per-app-or-model Templates which may be overridden per
app or model]?
I'm not exactly sure about the formatting that could be used, but this is
what I have in mind for now:
* **change_list.html** with the following context:
* **module_name**
* **selection_note** - text containing count of selected records (eg. `0
of %(cnt)s selected`)
* **selection_note_all** - same as **selection_note** but with all
records
* **title** - title of the page
* ...
--
Ticket URL: <https://code.djangoproject.com/ticket/15059#comment:6>
Comment (by hassanmian):
Hi all,
(Please be aware that this is my first contribution, so any feedback is
highly appreciated)
I've added some context variables for actions.html. Basically, gone
through the variables that are being used in django's implementation of
actions.html and tried to document them. I'm not sure if the format is as
expected though.
If this is the way we want the document to be, I'd be happy to add the
documentation for the rest of the admin templates as well.
--
Ticket URL: <https://code.djangoproject.com/ticket/15059#comment:7>
* cc: Akshat verma (added)
Comment:
from django.contrib import admin
from myapp.models import Author
class AuthorAdmin(admin.ModelAdmin):
pass
admin.site.register(Author, AuthorAdmin)
# Now we need to change UI/UX from NULL to False.
--
Ticket URL: <https://code.djangoproject.com/ticket/15059#comment:8>
* owner: nobody => Akshat verma
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/15059#comment:9>