Skip to content

Commit

Permalink
update for django 2 python 3 in preperation for major release.
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcleon committed Oct 17, 2018
1 parent 35a41b4 commit d511ead
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 345 deletions.
225 changes: 0 additions & 225 deletions odm2admin/templatetags/admin_shortcuts_mod.py

This file was deleted.

3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ django-daterange-filter
django-import-export
django-jquery
# django-kronos
django==2.1.2
#django-ajax-selects is not working with django 2.1.2 or 2.1.1
django==2.0.8
# Pinned to 0.2.7 to preserve page style.
djangocms-admin-style==0.2.7
psycopg2
Expand Down
17 changes: 9 additions & 8 deletions templatesAndSettings/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@
'{}'.format(APP_NAME),
'import_export',
'social_django',
'admin_shortcuts',
'daterange_filter',
'captcha',
'fixture_magic',
# 'dal',
# 'dal_select2',
'ajax_select',
'admin_shortcuts',
'django.contrib.admin',
'django.contrib.gis',
'django.contrib.auth',
Expand All @@ -203,44 +203,45 @@
'url': CUSTOM_TEMPLATE_PATH,
'app_name': '{}'.format(APP_NAME),
'title': '{}'.format(VERBOSE_NAME),
'class': 'config',
'icon': 'cogs',
},
{
'url': '/' + 'AddSensor',
'app_name': '{}'.format(APP_NAME),
'title': 'Add Sensor Data',
'class': 'tool',
'icon': 'wrench', # tool
},
{
'url': '/' + 'AddProfile',
'app_name': '{}'.format(APP_NAME),
'title': 'Add Soil Profile Data',
'class': 'flag',
'icon': 'flag',
},
{
'url': '/' + 'RecordAction',
'app_name': '{}'.format(APP_NAME),
'title': 'Record an Action',
'class': 'notepad',
'icon': 'sticky-note',
},
{
'url': '/' + 'ManageCitations',
'app_name': '{}'.format(APP_NAME),
'title': 'Manage Citations',
'class': 'pencil',
'icon': 'edit',
},
{
'url': '/' + 'chartIndex',
'app_name': '{}'.format(APP_NAME),
'title': 'Graph My Data',
'class': 'monitor',
'title': 'Map My Data',
'icon': 'map-marked-alt',
},
]
},
]
ADMIN_SHORTCUTS_SETTINGS = {
'hide_app_list': False,
'open_new_window': False,
'show_on_all_pages': True,
}
""" END ADMIN SHORTCUTS CONFIGURATION """

Expand Down
3 changes: 1 addition & 2 deletions templatesAndSettings/templates/admin/app_index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% extends "admin/app_index.html" %}

{% load admin_extras %}
{% load admin_shortcuts_mod %}
{% load static %}
{% load i18n admin_static admin_shortcuts_tags %}
{# django-admin-shortcuts changes these blocks #}
Expand All @@ -19,7 +18,7 @@
</div>
{% else %}
<div class="admin_shortcuts">
{% admin_shortcuts_filter %}
{% admin_shortcuts %}
</div>
{% endif %}
{% endfor %}
Expand Down
9 changes: 5 additions & 4 deletions templatesAndSettings/templates/admin/base_site.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{% extends "admin/base.html" %}
{% load i18n staticfiles admin_shortcuts_tags %}

{% block extrastyle %}
<style type="text/css">{% admin_shortcuts_css %}</style>
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}"/>{% endblock %}

{% endblock %}

{% block extrahead %}
{% block extrahead %}{{ block.super }}{% admin_shortcuts_js %}

<link rel="stylesheet" type="text/css" href="{% static 'djangocms_admin_style/css/djangocms-admin.css' %}" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<script type="text/javascript">
if (window.self!==window.top) { document.write('<link rel="stylesheet" type="text/css" href="{% static 'djangocms_admin_style/css/djangocms-admin-frontend.css' %}" />'); }
</script>
<script src="https://use.fontawesome.com/eb9894ac79.js"></script>

<link rel="stylesheet" href="{% static "css/target_href_style.css" %}" />
{% include 'admin/inc/extrahead.html' %}{% endblock %}

Expand Down
1 change: 1 addition & 0 deletions templatesAndSettings/templates/admin/inc/extrahead.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% load admin_shortcuts_tags %}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
{% block extrahead %}{% admin_shortcuts_js %}
{% endblock %}
Loading

1 comment on commit d511ead

@miguelcleon
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

admin_shortcuts are fixed here for django 2

Please sign in to comment.