Code Monkey home page Code Monkey logo

django-command-palette's Introduction

Django Command Palette

Palette is a Django app to add command palette to your Django admin.. This will make it easy to navigate the Admin page with Ctrl/Cmd + k

screenshot

Quick start

  1. Install palette from PyPI

    pip install django-command-palette
    
  2. Add "palette" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
       ...
       'palette.apps.PaletteConfig',
       'palette.apps.PaletteAdminConfig',
    
       # django.contrib.admin # Remove this line from code
    ]
    
  3. Start the development server and visit http://127.0.0.1:8000/admin/

  4. Visit http://127.0.0.1:8000/admin and type Ctrl/Cmd + K

Credits

This project is heavily inspired by kbar

django-command-palette's People

Contributors

enriquesoria avatar jgillard avatar rajasimon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

django-command-palette's Issues

Chrome on Windows already uses Ctrl + k

This may affect other browsers also but I've only tested with Chrome. Palette's keyboard shortcut is already used for a Chrome feature, so it's currently impossible to use your app. It's documented here: https://support.google.com/chrome/answer/157179?hl=en&co=GENIE.Platform%3DDesktop#zippy=%2Caddress-bar-shortcuts:~:text=Search%20from%20anywhere%20on%20the%20page

I'm not sure what the best solution to this is. I tried using preventDefault and stopPropagation but it didn't work for me. I found a discussion about this same key combo here: https://github.com/orgs/community/discussions/24057#discussion-4250265

Up and down keys should scroll the model list

Pretty straightforward feature: when there are multiple options, it'd be great to use the arrow keys to scroll the list before hitting enter. I'm happy to PR this unless you want to.

Sub navigation to add, edit page

After selected the model when hitting the tab or space that follows to select the add, edit dialogue should open. Upon selecting the navigation should redirect to add, edit page correctly.

users > 
add
view -  default to model page but can also mention sub id that will navigate to view by id

Question

If I want to use the same thing for django templates is there a library for that or does this one also support that? also is there more docs on how to customize it and add actions, animations, icons to the actions, ... etc?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.