Coder Social home page Coder Social logo

mrbenn's Introduction

MrBenn Toolbar Plugin

MrBenn explainer animation

Saving you 10 seconds, 100 times a day.

Docs | Install | Contribute

tests license downloads docs

The MrBenn Toolbar Plugin is an addon for the Django Debug Toolbar which allows you to quickly open template files and views in your IDE.

MrBenn demo

Installation

To install the MrBenn, you can use pip! Simply follow the command below:

pip install mrbenn-toolbar-plugin

After the package has been installed, head over to your settings.py. You need to add the following:

  • in INSTALLED_APPS add mrbenn_panel

  • under DEBUG_TOOLBARS add mrbenn_panel.panel.MrBennPanel. We recommend you remove debug_toolbar.panels.staticfiles.StaticFilesPanel.

  • you need to add the location of the IDE you would like to use to open files with an option called DJANGO_WINDOWS_IDE in your settings. For example, the setting for the PyCharm Interpreter would be DJANGO_WINDOWS_IDE="C:/Program Files/JetBrains/PyCharm 2023.1.1/bin/pycharm64.exe.

  • MAC USERS: you will need to tell your operating system to use your IDE to open python and html files by default. This guide could be helpful.

  • LINUX USERS: we've not tested this yet. We assume the same steps for MAC USERS.

Limitations and next steps

Do not use this package in production. Do not use Django-Debug-Toolbar in production either! In this package, Template file-system location information is sent to the backend via a url-parameter. As it stands, any files on your file system could be opened by manipulating this parameter. An easy pull-request would be to check that a file to be opened exists within the current project, before opening it.

Django-debug-toolbar cleverly uses keys instead of raw file system information ( see here) . This would also be good next step for this package to implement.

Requirements

On top of Django, MrBenn requires the Django Debug Toolbar package found here.

How to contribute?

All contributions are appreciated! To contribute, simply create a new branch with your contribution and raise a PR! You can ping @andytwoods should any issues arise!

Should you get stuck on something, we also have a contributing section in our wiki! LINK TBD

What's with the name?

Mr Benn was a kids UK TV show from the 70s (wikipedia). The main character, Mr Benn, on each episode walked through a magical door which took him on different adventures. Perhaps I was thinking that this package in a similar fashion performs a little IDE magic, transporting you to the right file, each time you click the link to your current view or template. #ModernKidsTVshowsSuck #CBEEBIESthoughRocks

mrbenn's People

Contributors

robertispas avatar andytwoods avatar robertispas17 avatar jacksonsamuelmoore avatar

Stargazers

Stuart Axon avatar Christopher Mayfield avatar Nikolaus Schlemm avatar Wilhelm Klopp avatar Patrick Arminio avatar Corentin Bettiol avatar John Beimler avatar Jannik Waschkau avatar Wim Olivier avatar Izabela Kowal avatar Andrew Sanchez avatar Christopher Grande avatar Laurent Paoletti avatar Jeff Triplett avatar John Speno avatar Noam  Vergain avatar Al Whatmough avatar  avatar Tobi DEGNON avatar Ryan Cheley avatar Trey Piepmeier avatar 0xC4 avatar Amusat Haki Adeyemi avatar Sencer H. avatar Kai Kuhlmann avatar Ethem avatar Will Vincent avatar  avatar

Watchers

Noam  Vergain avatar  avatar James Cloos avatar  avatar  avatar  avatar

Forkers

stuaxo

mrbenn's Issues

Fix tests

Tests need fixing as they are currently not working on the current state

(Smal fix) Can't install: Project name field in pyproject.toml doesn't follow pep0508

https://peps.python.org/pep-0508/

I tried submitting a PR a couple of times, but I guess github is not happy today -

Installing locally with pip install -e . or python setup.py develop both failed, complaining about the name field

Lower casing the name, and replacing spaces with hyphens meant installation ran to completion.

$ pip install -e .
Obtaining file:///home/stu/projects/external/mrbenn
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [46 lines of output]
      configuration error: `project.name` must be pep508-identifier
      DESCRIPTION:
          The name (primary identifier) of the project. MUST be statically defined.
      
      GIVEN VALUE:
          "MrBenn Toolbar Plugin"
      
      OFFENDING RULE: 'format'
      
      DEFINITION:
          {
              "type": "string",
              "format": "pep508-identifier"
          }

...

Does this use 3.8 features (could it work under 3.7)

I've joined a project that (currently) only goes as high as 3.7, could this work there ?

$ pip install mrbenn-toolbar-plugin
ERROR: Ignored the following versions that require a different python version: 0.0.1 Requires-Python >=3.8
ERROR: Could not find a version that satisfies the requirement mrbenn-toolbar-plugin (from versions: none)
ERROR: No matching distribution found for mrbenn-toolbar-plugin

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.