Skip to content

Commit

Permalink
Remove modules division, move everything to top package
Browse files Browse the repository at this point in the history
  • Loading branch information
gbdlin committed Mar 22, 2019
1 parent 5e8b928 commit 946ba3e
Show file tree
Hide file tree
Showing 28 changed files with 10 additions and 18 deletions.
8 changes: 3 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ This package provides bunch of useful tools for default django admin site, such

- `Admin sidebar`_

Tools are suited in separate packages, so you can pick ones that suits your needs.

All configuration is held in ``ADMIN_TOOLBOX`` dict that should be placed in your ``settings.py`` file.

Admin sidebar
Expand All @@ -22,7 +20,7 @@ Installation
------------

1. Install admin toolbox (if not installed already)
2. add ``admin_toolbox.sidebar`` (or anything you've named it) at the top of your ``INSTALLED_APPS`` (at least above ``django.contrib.admin``)
2. add ``admin_toolbox`` at the top of your ``INSTALLED_APPS`` (at least above ``django.contrib.admin``)

Configuration
-------------
Expand All @@ -35,7 +33,7 @@ below shows how admin menu is built by default:
ADMIN_TOOLBOX = {
'sidebar': {
'default': ('admin_toolbox.sidebar.builders.AppsListBuilder', {}),
'default': ('admin_toolbox.builders.AppsListBuilder', {}),
}
}
Expand All @@ -44,7 +42,7 @@ specify more than one menu). For now, only ``default`` menu is used, other ones
root element. Each element is specified by tuple containing string and dictionary. String should be valid python dot
path to builder class, dictionary contains all default arguments that will be passed to that class when initializing.

Each builder is one of ``ListBuilder`` or ``ItemBuilder`` from ``admin_toolbox.sidebar.builders`` module or any subclass
Each builder is one of ``ListBuilder`` or ``ItemBuilder`` from ``admin_toolbox.builders`` module or any subclass
of them. For root element, only ``ListBuilder`` and it's subclasses are allowed.

Root element of each menu is a container for whole menu, but it's logic is still invoked, but it won't be rendered as
Expand Down
1 change: 1 addition & 0 deletions admin_toolbox/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
default_app_config = 'admin_toolbox.apps.SidebarConfig'
2 changes: 1 addition & 1 deletion admin_toolbox/sidebar/apps.py → admin_toolbox/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class SidebarConfig(AppConfig):
name = 'admin_toolbox.sidebar'
name = 'admin_toolbox'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion admin_toolbox/dark_theme/__init__.py

This file was deleted.

5 changes: 0 additions & 5 deletions admin_toolbox/dark_theme/apps.py

This file was deleted.

2 changes: 1 addition & 1 deletion admin_toolbox/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
ADMIN_TOOLBOX = getattr(settings, 'ADMIN_TOOLBOX', {})

sidebar = ADMIN_TOOLBOX.get('sidebar', {
'default': 'admin_toolbox.sidebar.builders.AppsListBuilder',
'default': 'admin_toolbox.builders.AppsListBuilder',
})
1 change: 0 additions & 1 deletion admin_toolbox/sidebar/__init__.py

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.

0 comments on commit 946ba3e

Please sign in to comment.