SimpleUI Documentation

repository·master·Indexed 26 days ago

https://github.com/newpanjing/simpleui

A modern Django Admin theme built with Element-UI and Vue. It replaces the default Django Admin interface with a user-friendly UI featuring multi-tab pages and 28 built-in themes. Includes a global `window.app` object for programmatic tab and navigation control, and a custom `v-waves` Vue directive for ripple effects.

Tokens
830
Snippets
5
Records
11
Agent score
37%

What's inside django-simpleui

  1. Run django-simpleui demo via Docker

    master

    You can quickly experience SimpleUI by running the official demo container.

    ```shell
    docker pull newpanjing/simpleui_demo
    
    docker run -p 8080:8080 newpanjing/simpleui_demo

    After starting, access the demo at: http://127.0.0.1:8080

  2. Configure django-simpleui in Django settings

    master

    To activate SimpleUI, add 'simpleui' to the top of your INSTALLED_APPS list in settings.py. It must appear before 'django.contrib.admin' to override the default Django admin interface.

    # Application definition
    
    INSTALLED_APPS = [
        'simpleui',
        'django.contrib.admin',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.messages',
        'django.contrib.staticfiles',
        ...
    ]
  3. Control tabs and navigation via the app object

    master

    The main application instance is exposed globally as window.app. You can use it to programmatically manage tabs and navigation within the admin interface.

    Key methods:

    • openTab(data, index, selected, loading): Opens a new tab or selects an existing one. data should be an object containing url, name, and optionally eid (unique ID) or breadcrumbs.
    • handleTabsEdit(targetId, action): Manages tab lifecycle. Use action: 'remove' to close a specific tab.
    • logout(): Triggers the logout process, clearing session data and submitting the #logout_form.