diff options
-rw-r--r-- | app/sightings/forms.py | 2 | ||||
-rw-r--r-- | design/templates/admin/base.html | 37 |
2 files changed, 26 insertions, 13 deletions
diff --git a/app/sightings/forms.py b/app/sightings/forms.py index ffb4a40..77d61f9 100644 --- a/app/sightings/forms.py +++ b/app/sightings/forms.py @@ -6,7 +6,7 @@ from .models import Sighting class SightingsForm(autocomplete.FutureModelForm): class Meta: model = Sighting - fields = ('ap', 'point', 'pub_date') + fields = ('pub_date','ap', 'point',) widgets = { 'ap': autocomplete.ModelSelect2(url='ap-autocomplete') } diff --git a/design/templates/admin/base.html b/design/templates/admin/base.html index 080a3a4..c4c7ca8 100644 --- a/design/templates/admin/base.html +++ b/design/templates/admin/base.html @@ -1,19 +1,23 @@ -{% load admin_static %}<!DOCTYPE html> +{% load i18n static %}<!DOCTYPE html> +{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %} <html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> <head> <title>{% block title %}{% endblock %}</title> <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}" /> -<script type="text/javascript" src="/static/admin/js/jquery.js"></script> {% block extrastyle %}{% endblock %} -<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% static "admin/css/ie.css" %}{% endblock %}" /><![endif]--> {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}" />{% endif %} -<script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% static "admin/" %}{% endfilter %}";</script> {% block extrahead %}{% endblock %} +{% block responsive %} + <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive.css" %}" /> + {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive_rtl.css" %}" />{% endif %} +{% endblock %} {% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %} </head> {% load i18n %} -<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"{% block onload %}{% endblock %}> +<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}" + data-admin-utc-offset="{% now "Z" %}"> <!-- Container --> <div id="container"> @@ -24,14 +28,22 @@ <div id="branding"> {% block branding %}{% endblock %} </div> - {% if user.is_active and user.is_staff %} + {% block usertools %} + {% if has_permission %} <div id="user-tools"> - {% trans 'Welcome,' %} - <strong>{% filter force_escape %}{% firstof user.get_short_name user.get_username %}{% endfilter %}</strong>. + {% block welcome-msg %} + {% trans 'Welcome,' %} + <strong>{% firstof user.get_short_name user.get_username %}</strong>. + {% endblock %} {% block userlinks %} - {% url 'django-admindocs-docroot' as docsroot %} - {% if docsroot %} - <a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / + {% if site_url %} + <a href="{{ site_url }}">{% trans 'View site' %}</a> / + {% endif %} + {% if user.is_active and user.is_staff %} + {% url 'django-admindocs-docroot' as docsroot %} + {% if docsroot %} + <a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / + {% endif %} {% endif %} {% if user.has_usable_password %} <a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> / @@ -40,6 +52,7 @@ {% endblock %} </div> {% endif %} + {% endblock %} {% block nav-global %}{% endblock %} </div> <!-- END Header --> @@ -54,7 +67,7 @@ {% block messages %} {% if messages %} <ul class="messagelist">{% for message in messages %} - <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li> + <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li> {% endfor %}</ul> {% endif %} {% endblock messages %} |