Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Improve admin user friendliness #1707

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

ryangallen commented Oct 4, 2013

https://code.djangoproject.com/ticket/21220

Links to the admin index and site index in the header
Green success messages
Tone down the red error messages
Min-width for date and time fields (could not read whole date in input box when clicking 'Today')
A handful of other subtle details

Member

mjtamlyn commented Oct 4, 2013

This will need a ticket. Screenshots of the visual changes would also be helpful.

ryankask pushed a commit to ryankask/django that referenced this pull request Oct 4, 2013

Contributor

ryangallen commented Oct 4, 2013

Hi @mjtamlyn, this is my first time contributing so I'm unfamiliar with the ticket system. Is it part of GitHub or the Django Project site?

Here are screen shots:

Overview

01-overview

Errors

02-errors

Successes

03-successes

Datefield Before

04-datefield-before

Datefield After

05-datefield-after

Link to Site

07-link-to-site

Link to Admin Home

06-link-to-admin-home

@mjtamlyn mjtamlyn commented on an outdated diff Oct 4, 2013

django/contrib/admin/templates/admin/base_site.html
-<h1 id="site-name">{{ site_header }}</h1>
+<h1 id="site-name">
+ <a href="{% url 'admin:index' %}">{{ site_header }}</a>
+</h1>
+{% endblock %}
+
+{% block welcome-msg %}
+ {% trans 'Welcome,' %}
+ <strong>{% firstof user.get_short_name user.get_username %}</strong>.
+{% endblock %}
+
+{% block userlinks %}
+ {% if site_title %}
+ <a href="{% url 'home' %}">{{ site_title }}</a> /
+ {% else %}
+ <a href="{% url 'home' %}">View Site</a> /
@mjtamlyn

mjtamlyn Oct 4, 2013

Member

You can't assume that any urls like this will exist. That applies to django-admindocs-docroot below as well.

Member

mjtamlyn commented Oct 4, 2013

Hi Ryan, Glad you want to contribute. You may want to read over the contributing documentation.

As for the patch, some of it looks good, some of it less so. Personally I like my error messages as big and red as possible, and I'm not sure I like the idea of linking to the home page from the admin - some of my sites are an admin and an API - there is no "home page" to speak of. It seems something which should be easy to add, but not placed automatically.

The tweaks to the input widths look useful though.

Contributor

ryangallen commented Oct 4, 2013

Thank you, I will definitely look through the contributing docs and get a ticket submitted.

Good point regarding linking to the site home page - not every site has a 'home' page. I added a commit to remedy that issue in the same way the Admin Docs link is only displayed if the 'django-admindocs-docroot' url exists.

I suppose the preference between a fierce #f00 red error and a gentler #c11 one is just that, a preference, but I would say that the latter is just as noticeable to a user.

Is this topic open for large group discussion? It seems worthwhile to get community opinion on the matter.

And thank you for discussing with me so far, contributing is pretty fun with such an active project.

@ryangallen ryangallen closed this Oct 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment