django-dashub


Namedjango-dashub JSON
Version 3.0.7 PyPI version JSON
download
home_pageNone
SummaryA modern Django admin dashboard with enhanced customization options, inspired by Jazzmin but featuring a fresh theme and additional functionality.
upload_time2025-07-11 07:45:34
maintainerNone
docs_urlNone
authorSuresh Chand
requires_pythonNone
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center" id="title">Dashub</h1>

<p align="center"><img src="https://socialify.git.ci/klixsoft/django-dashub/image?font=Inter&amp;forks=1&amp;issues=1&amp;language=1&amp;name=1&amp;owner=1&amp;pattern=Circuit%20Board&amp;pulls=1&amp;stargazers=1&amp;theme=Light" alt="project-image"></p>

<p>A modern Django admin dashboard with enhanced customization options, inspired by Jazzmin but featuring a fresh theme and additional functionality.</p>

## Features

- Customizable site title, logo, and favicon
- Custom theme color support
- Ordered menu and submenu management
- Custom links for side menu apps
- Custom sidebar menu support
- Related modal support for improved usability
- Enhanced UI tweaks with collapsible and tab-based change views

## Installation

Since Dashub is available on PyPI, you can install it directly using `pip`.

```bash
pip install django-dashub
```

## Configuration

To use Dashub, add it to your Django project's installed apps:

```python
INSTALLED_APPS = [
    'dashub',
    'django.contrib.admin',
    ...
]
```

## Customization

All the configuration settings for Dashub are defined in the `DASHHUB_SETTINGS` dictionary in your Django settings file. You can customize the appearance and behavior of the admin dashboard by modifying these settings.

### 1. Site Identification

### `site_logo`
Defines the path to the site logo image.

- **Example:**
  ```python
  "site_logo": "/static/logo.svg"
  
### `site_icon`
Defines the path to the site's favicon.

- **Example:**
  ```python
  "site_icon": "/static/favicon.ico"

### `theme_color`
Sets the theme color for the site. This will reflect in the browser's address bar or UI elements.

- **Example:**
  ```python
  "theme_color": "#31aa98"
  

### 2. **Hide Models**

### `hide_models`
This setting allows you to hide specific models in the Django admin panel. Models are specified using the `{app_name}.{model_name}` format, in lowercase. You can hide multiple models by listing them in an array.

- **Format:**
  ```python
  "hide_models": [
      "app_name.model_name",
      "another_app.another_model"
  ]
  ```

- **Example:**
  ```python
  "hide_models": [
      "user.group",
  ]
  ```

This configuration hides the `group` model from the `user` app.

---

## 3. **Custom Links**

### `custom_links`
Custom links are used to add new sections or menus to the sidebar of the admin interface. You can create custom sections by providing an array of menus under specific app names. 

Each menu item can have the following options:
- `name` (optional): The name of the menu item.
- `url` (optional): The URL to be linked to.
- `icon` (optional): The icon to display for the menu item (using Font Awesome classes).
- `order` (optional): Defines the order of the menu item (higher numbers appear higher).
- `submenu` (optional): A list of submenus within the menu. Each submenu can contain either a `model` key or an entire submenu structure.
- `model` (optional): If a model is passed, it will link directly to that model, removing the need to provide a `name` or `url`. Models are specified in lowercase as `{app_name}.{model_name}`.

Either model or name and URL are required for each menu item.

If the app specified in `custom_links` does not exist, it will create a new section for that app in the sidebar.

#### Example:
```python
"custom_links": {
    "advance": [
        {"name": "File Manager", "url": "/admin/filemanager/", "icon": "fa-solid fa-folder", "order": 1},
        {"model": "user.group", "icon": "fa-solid fa-user", "order": 2}
    ]
}
```

In this example:
- The "advance" section contains two menu items: "File Manager" and "User". If the "advance" section does not exist, it will be created. If exists then it will add the menu items to the existing section.

### 4. Submenus with Models
If you want a submenu to link to specific models, you can specify the `model` directly. This removes the need for a `url` or `name` in the submenu item.

#### Example:
```python
"core": [
    {
        "name": "User Management",
        "icon": "fa-solid fa-users",
        "submenu": [
            {"model": "auth.user", "order": 1},
            {"model": "auth.group", "order": 2}
        ]
    }
]
```

In this example, the submenu under "User Management" links directly to `auth.user` and `auth.group` models.

---

## 5. **Model Submenus**

### `model_submenus`
The `model_submenus` setting allows you to link specific models to submenus under other models or app sections. The configuration for model submenus is similar to that of `custom_links`, allowing you to specify both `model` and `submenu` for any app.

Each submenu can also contain a `model` key and/or a `submenu` structure.

- **Format:**
  ```python
  "model_submenus": {
      "app_name.model_name": [
          {"model": "app_name.model_name", "order": 1},
          {"model": "another_app.another_model", "order": 2}
      ]
  }
  ```

- **Example:**
  ```python
  "model_submenus": {
      "core.post": [
          {"model": "core.postcategory", "order": 1}
      ]
  }
  ```

In this configuration:
- The `core.post` model has a submenu linking to the `core.postcategory` model.

Submenus can also have their own submenu structure, just like the `custom_links` setting.

---

## 6. **Default Orders**

### `default_orders`
The `default_orders` setting defines the order in which menus and models are displayed in the admin interface. This helps control the sequence of items shown in the sidebar and the admin list views. A higher value indicates higher priority (i.e., the item appears at the top).

- **Format:**
  ```python
  "default_orders": {
      "app_name": order_value,
      "app_name.model_name": order_value
  }
  ```

- **Example:**
  ```python
  "default_orders": {
      "core": 10,
      "core.page": 2,
      "core.post": 1,
      "user": 20
  }
  ```

In this example:
- The `user` app has the highest priority (order `20`) so appear it first.
- The `core.page` model has the highest order (`1`), meaning it will be shown first.

---

## 7. **Icons**

### `icons`
The `icons` setting allows you to define icons for models and their submenus using Font Awesome class names. Icons are applied to models directly and help improve the visual presentation of the dashboard.

- **Format:**
  ```python
  "icons": {
      "app_name.model_name": "fa-icon-class"
  }
  ```

- **Example:**
  ```python
  "icons": {
      "core.page": "fa-regular fa-file",
      "core.post": "fa-regular fa-newspaper",
  }
  ```

This configuration assigns icons to `core.page`, `core.post`, and `healthpackage.lab` using Font Awesome icon classes.

- **Note:** Icons are only applied to models. Submenus do not have icons.

## 8. **Full Configuration Example**

Here is an example of a complete `DASHHUB_SETTINGS` configuration:

```python
DASHUB_SETTINGS = {
    "site_logo": "/static/logo.svg",
    "site_icon": "/static/favicon.ico",
    "theme_color": "#31aa98",
    "border_radius": "5px",
    "hide_models": [
        "auth",  # Hides all models in the auth app
        "auth.group"  # Hides the group model in the auth app
    ],
    "custom_links": {
        "auth": [
            {
                "model": "auth.post" # Links directly to the auth.post model
            },
            {
                "name": "User Management",
                "icon": "fa-solid fa-users",
                "submenu": [
                    {"model": "auth.user", "order": 1},
                    {"model": "auth.group", "order": 2}
                ]
            }
        ],
    },
    "submenus_models": ["auth.group"],
    "default_orders": {
        "auth": 10,
        "auth.group": 4,
    },
    "icons": {
        "auth": "fa-regular fa-user",
        "auth.user": "fa-regular fa-user",
    },
    "custom_js": [
        "/static/js/admin.js",
    ],
    "custom_css": [
        "/static/css/admin.css",
    ]
}
``` 

## Dependencies

- Django 3.2+
- Bootstrap 5
- Font Awesome 5 
- jQuery

## Contributing

Contributions are welcome! Please follow these steps:

1. Fork the repository
2. Create a feature branch
3. Submit a Pull Request

GitHub Repository: [https://github.com/klixsoft/django-dashub](https://github.com/klixsoft/django-dashub)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-dashub",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Suresh Chand",
    "author_email": "scthakuri12a@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f3/99/81aab182c2120eeed79d3855e5186879c20c65bf871a0358f0a198bde440/django_dashub-3.0.7.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\" id=\"title\">Dashub</h1>\n\n<p align=\"center\"><img src=\"https://socialify.git.ci/klixsoft/django-dashub/image?font=Inter&amp;forks=1&amp;issues=1&amp;language=1&amp;name=1&amp;owner=1&amp;pattern=Circuit%20Board&amp;pulls=1&amp;stargazers=1&amp;theme=Light\" alt=\"project-image\"></p>\n\n<p>A modern Django admin dashboard with enhanced customization options, inspired by Jazzmin but featuring a fresh theme and additional functionality.</p>\n\n## Features\n\n- Customizable site title, logo, and favicon\n- Custom theme color support\n- Ordered menu and submenu management\n- Custom links for side menu apps\n- Custom sidebar menu support\n- Related modal support for improved usability\n- Enhanced UI tweaks with collapsible and tab-based change views\n\n## Installation\n\nSince Dashub is available on PyPI, you can install it directly using `pip`.\n\n```bash\npip install django-dashub\n```\n\n## Configuration\n\nTo use Dashub, add it to your Django project's installed apps:\n\n```python\nINSTALLED_APPS = [\n    'dashub',\n    'django.contrib.admin',\n    ...\n]\n```\n\n## Customization\n\nAll the configuration settings for Dashub are defined in the `DASHHUB_SETTINGS` dictionary in your Django settings file. You can customize the appearance and behavior of the admin dashboard by modifying these settings.\n\n### 1. Site Identification\n\n### `site_logo`\nDefines the path to the site logo image.\n\n- **Example:**\n  ```python\n  \"site_logo\": \"/static/logo.svg\"\n  \n### `site_icon`\nDefines the path to the site's favicon.\n\n- **Example:**\n  ```python\n  \"site_icon\": \"/static/favicon.ico\"\n\n### `theme_color`\nSets the theme color for the site. This will reflect in the browser's address bar or UI elements.\n\n- **Example:**\n  ```python\n  \"theme_color\": \"#31aa98\"\n  \n\n### 2. **Hide Models**\n\n### `hide_models`\nThis setting allows you to hide specific models in the Django admin panel. Models are specified using the `{app_name}.{model_name}` format, in lowercase. You can hide multiple models by listing them in an array.\n\n- **Format:**\n  ```python\n  \"hide_models\": [\n      \"app_name.model_name\",\n      \"another_app.another_model\"\n  ]\n  ```\n\n- **Example:**\n  ```python\n  \"hide_models\": [\n      \"user.group\",\n  ]\n  ```\n\nThis configuration hides the `group` model from the `user` app.\n\n---\n\n## 3. **Custom Links**\n\n### `custom_links`\nCustom links are used to add new sections or menus to the sidebar of the admin interface. You can create custom sections by providing an array of menus under specific app names. \n\nEach menu item can have the following options:\n- `name` (optional): The name of the menu item.\n- `url` (optional): The URL to be linked to.\n- `icon` (optional): The icon to display for the menu item (using Font Awesome classes).\n- `order` (optional): Defines the order of the menu item (higher numbers appear higher).\n- `submenu` (optional): A list of submenus within the menu. Each submenu can contain either a `model` key or an entire submenu structure.\n- `model` (optional): If a model is passed, it will link directly to that model, removing the need to provide a `name` or `url`. Models are specified in lowercase as `{app_name}.{model_name}`.\n\nEither model or name and URL are required for each menu item.\n\nIf the app specified in `custom_links` does not exist, it will create a new section for that app in the sidebar.\n\n#### Example:\n```python\n\"custom_links\": {\n    \"advance\": [\n        {\"name\": \"File Manager\", \"url\": \"/admin/filemanager/\", \"icon\": \"fa-solid fa-folder\", \"order\": 1},\n        {\"model\": \"user.group\", \"icon\": \"fa-solid fa-user\", \"order\": 2}\n    ]\n}\n```\n\nIn this example:\n- The \"advance\" section contains two menu items: \"File Manager\" and \"User\". If the \"advance\" section does not exist, it will be created. If exists then it will add the menu items to the existing section.\n\n### 4. Submenus with Models\nIf you want a submenu to link to specific models, you can specify the `model` directly. This removes the need for a `url` or `name` in the submenu item.\n\n#### Example:\n```python\n\"core\": [\n    {\n        \"name\": \"User Management\",\n        \"icon\": \"fa-solid fa-users\",\n        \"submenu\": [\n            {\"model\": \"auth.user\", \"order\": 1},\n            {\"model\": \"auth.group\", \"order\": 2}\n        ]\n    }\n]\n```\n\nIn this example, the submenu under \"User Management\" links directly to `auth.user` and `auth.group` models.\n\n---\n\n## 5. **Model Submenus**\n\n### `model_submenus`\nThe `model_submenus` setting allows you to link specific models to submenus under other models or app sections. The configuration for model submenus is similar to that of `custom_links`, allowing you to specify both `model` and `submenu` for any app.\n\nEach submenu can also contain a `model` key and/or a `submenu` structure.\n\n- **Format:**\n  ```python\n  \"model_submenus\": {\n      \"app_name.model_name\": [\n          {\"model\": \"app_name.model_name\", \"order\": 1},\n          {\"model\": \"another_app.another_model\", \"order\": 2}\n      ]\n  }\n  ```\n\n- **Example:**\n  ```python\n  \"model_submenus\": {\n      \"core.post\": [\n          {\"model\": \"core.postcategory\", \"order\": 1}\n      ]\n  }\n  ```\n\nIn this configuration:\n- The `core.post` model has a submenu linking to the `core.postcategory` model.\n\nSubmenus can also have their own submenu structure, just like the `custom_links` setting.\n\n---\n\n## 6. **Default Orders**\n\n### `default_orders`\nThe `default_orders` setting defines the order in which menus and models are displayed in the admin interface. This helps control the sequence of items shown in the sidebar and the admin list views. A higher value indicates higher priority (i.e., the item appears at the top).\n\n- **Format:**\n  ```python\n  \"default_orders\": {\n      \"app_name\": order_value,\n      \"app_name.model_name\": order_value\n  }\n  ```\n\n- **Example:**\n  ```python\n  \"default_orders\": {\n      \"core\": 10,\n      \"core.page\": 2,\n      \"core.post\": 1,\n      \"user\": 20\n  }\n  ```\n\nIn this example:\n- The `user` app has the highest priority (order `20`) so appear it first.\n- The `core.page` model has the highest order (`1`), meaning it will be shown first.\n\n---\n\n## 7. **Icons**\n\n### `icons`\nThe `icons` setting allows you to define icons for models and their submenus using Font Awesome class names. Icons are applied to models directly and help improve the visual presentation of the dashboard.\n\n- **Format:**\n  ```python\n  \"icons\": {\n      \"app_name.model_name\": \"fa-icon-class\"\n  }\n  ```\n\n- **Example:**\n  ```python\n  \"icons\": {\n      \"core.page\": \"fa-regular fa-file\",\n      \"core.post\": \"fa-regular fa-newspaper\",\n  }\n  ```\n\nThis configuration assigns icons to `core.page`, `core.post`, and `healthpackage.lab` using Font Awesome icon classes.\n\n- **Note:** Icons are only applied to models. Submenus do not have icons.\n\n## 8. **Full Configuration Example**\n\nHere is an example of a complete `DASHHUB_SETTINGS` configuration:\n\n```python\nDASHUB_SETTINGS = {\n    \"site_logo\": \"/static/logo.svg\",\n    \"site_icon\": \"/static/favicon.ico\",\n    \"theme_color\": \"#31aa98\",\n    \"border_radius\": \"5px\",\n    \"hide_models\": [\n        \"auth\",  # Hides all models in the auth app\n        \"auth.group\"  # Hides the group model in the auth app\n    ],\n    \"custom_links\": {\n        \"auth\": [\n            {\n                \"model\": \"auth.post\" # Links directly to the auth.post model\n            },\n            {\n                \"name\": \"User Management\",\n                \"icon\": \"fa-solid fa-users\",\n                \"submenu\": [\n                    {\"model\": \"auth.user\", \"order\": 1},\n                    {\"model\": \"auth.group\", \"order\": 2}\n                ]\n            }\n        ],\n    },\n    \"submenus_models\": [\"auth.group\"],\n    \"default_orders\": {\n        \"auth\": 10,\n        \"auth.group\": 4,\n    },\n    \"icons\": {\n        \"auth\": \"fa-regular fa-user\",\n        \"auth.user\": \"fa-regular fa-user\",\n    },\n    \"custom_js\": [\n        \"/static/js/admin.js\",\n    ],\n    \"custom_css\": [\n        \"/static/css/admin.css\",\n    ]\n}\n``` \n\n## Dependencies\n\n- Django 3.2+\n- Bootstrap 5\n- Font Awesome 5 \n- jQuery\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository\n2. Create a feature branch\n3. Submit a Pull Request\n\nGitHub Repository: [https://github.com/klixsoft/django-dashub](https://github.com/klixsoft/django-dashub)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "A modern Django admin dashboard with enhanced customization options, inspired by Jazzmin but featuring a fresh theme and additional functionality.",
    "version": "3.0.7",
    "project_urls": {
        "Bug Reports": "https://github.com/scthakuri/django-dashub/issues",
        "Source": "https://github.com/scthakuri/django-dashub"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3079907408ab16db65f41e6bfa1b402bee07ce33362d9965a5f3e2b10565eea",
                "md5": "e5d7561f60fa4e18bcdb7bf3e4a45196",
                "sha256": "9435b7590bacca1ff39b28732e5bc2fe0b3bcd841d485db56aee1b5205e08e9a"
            },
            "downloads": -1,
            "filename": "django_dashub-3.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e5d7561f60fa4e18bcdb7bf3e4a45196",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 343067,
            "upload_time": "2025-07-11T07:45:27",
            "upload_time_iso_8601": "2025-07-11T07:45:27.834818Z",
            "url": "https://files.pythonhosted.org/packages/d3/07/9907408ab16db65f41e6bfa1b402bee07ce33362d9965a5f3e2b10565eea/django_dashub-3.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f39981aab182c2120eeed79d3855e5186879c20c65bf871a0358f0a198bde440",
                "md5": "99b8986499912e3c999760f616efa64b",
                "sha256": "b25e5bebf8de0d541957f901ee0cb16251bd49b68bf8f78ed44522c8d5bcf103"
            },
            "downloads": -1,
            "filename": "django_dashub-3.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "99b8986499912e3c999760f616efa64b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 320481,
            "upload_time": "2025-07-11T07:45:34",
            "upload_time_iso_8601": "2025-07-11T07:45:34.428041Z",
            "url": "https://files.pythonhosted.org/packages/f3/99/81aab182c2120eeed79d3855e5186879c20c65bf871a0358f0a198bde440/django_dashub-3.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-11 07:45:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "scthakuri",
    "github_project": "django-dashub",
    "github_not_found": true,
    "lcname": "django-dashub"
}
        
Elapsed time: 0.44209s