diff --git a/README.md b/README.md
index 5a66d44..60b2a48 100644
--- a/README.md
+++ b/README.md
@@ -11,13 +11,18 @@ Assuming you have a [Wagtail](https://wagtail.io/) project up and running:
``` $ pip install wagtailgmaps```
-add wagtailgmaps to your `settings.py` in the INSTALLED_APPS section:
+add `wagtailgmaps` and `overextends` to your `settings.py` before any wagtail apps in the INSTALLED_APPS section:
```
-...
- 'modelcluster',
+ .
+ .
+ 'overextends',
'wagtailgmaps',
- 'wagtail.contrib.wagtailsitemaps',
+ 'wagtail.wagtailcore',
+ 'wagtail.wagtailadmin',
+ .
+ .
+ .
...
```
diff --git a/setup.py b/setup.py
index a63554f..7168969 100755
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@
setup(
name='wagtailgmaps',
- version='0.2.4',
+ version='0.2.5',
packages=['wagtailgmaps'],
include_package_data=True,
license='BSD License',
@@ -35,4 +35,5 @@
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
+ install_requires=['django-overextends'],
)
diff --git a/wagtailgmaps/templates/wagtailadmin/admin_base.html b/wagtailgmaps/templates/wagtailadmin/admin_base.html
index 1a7d629..40fbe34 100644
--- a/wagtailgmaps/templates/wagtailadmin/admin_base.html
+++ b/wagtailgmaps/templates/wagtailadmin/admin_base.html
@@ -1,34 +1,6 @@
-{% extends "wagtailadmin/skeleton.html" %}
-{% load compress static wagtailadmin_tags %}
-
-{% block css %}
- {% compress css %}
-
-
-
- {% endcompress %}
-
- {% block extra_css %}{% endblock %}
-{% endblock %}
-
-{% block branding_favicon %}
-
-{% endblock %}
+{% overextends "wagtailadmin/admin_base.html" %}
{% block js %}
- {% compress js %}
-
-
-
-
-
-
-
-
-
- {% main_nav_js %}
- {% endcompress %}
-
- {% block extra_js %}{% endblock %}
+ {{ block.super }}
{% endblock %}
\ No newline at end of file
diff --git a/wagtailgmaps/wagtail_hooks.py b/wagtailgmaps/wagtail_hooks.py
index 9478241..a0eea87 100644
--- a/wagtailgmaps/wagtail_hooks.py
+++ b/wagtailgmaps/wagtail_hooks.py
@@ -18,3 +18,17 @@ def editor_js():
)
return js_includes
+
+
+@hooks.register('insert_global_admin_css')
+def admin_css():
+ """
+ Add extra CSS files to the admin
+ """
+ css_files = [
+ 'wagtailadmin/css/admin.css',
+ ]
+
+ css_includes = format_html_join(
+ '\n', '', ((settings.STATIC_URL, filename) for filename in css_files))
+ return css_includes