Skip to main content

An addon for Django Debug Toolbar that allows for directly opening static files and views

Project description

MrBenn Toolbar Plugin

MrBenn explainer animation

Saving you 10 seconds, 100 times a day.

Docs | Install | Contribute

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.
  • finally, in your env file, you need to add the location of the IDE you would like to use to open files with an option called DJANGO_WINDOWS_IDE. For example, the setting for the PyCharm Interpreter would be DJANGO_WINDOWS_IDE=C:\Program Files\JetBrains\PyCharm 2021.1.3\bin\pycharm64.exe.

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 @andywoods should any issues arize!

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mrbenn-toolbar-plugin-0.0.2.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mrbenn_toolbar_plugin-0.0.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file mrbenn-toolbar-plugin-0.0.2.tar.gz.

File metadata

  • Download URL: mrbenn-toolbar-plugin-0.0.2.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for mrbenn-toolbar-plugin-0.0.2.tar.gz
Algorithm Hash digest
SHA256 90392aedcdc0b7cc99333273c1e8ff06da02a60e667b513ef5ad1a2ce1a8cc9d
MD5 c18ed2592bdcc0f71df9284e487b8af9
BLAKE2b-256 0c3c7097f48526cac88a642c661a32ca7548783e632b9a3f3a02f51e7045fd0e

See more details on using hashes here.

File details

Details for the file mrbenn_toolbar_plugin-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mrbenn_toolbar_plugin-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20edea949e7b6c60893d0e4f35df3c77153774758117fe3e3a0467a3bfd30cf3
MD5 dc72ff51576d387d0f7ae6b403f1d4a9
BLAKE2b-256 ddaa83a5bcc9f7dc68c8884f0ae067ed4896541b03a877923f2883d56d4bf2f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page