Login

Tag "textmate"

Snippet List

"Open file in Textmate"-support in werkzeug debugger browser view

1) Install django-extensions (requires werkzeug) 2) Paste snippet into settings.py 3) manage.py runserver_plus Now you should be able to open files in textmate by clicking the file links in the werkzeug error pages. It will also take you to the correct line number and highlight files that are in your project directory in a different color.

  • debug
  • error
  • debugging
  • textmate
Read More

DebugMiddleware footer with links to quick open file/line# in TextMate on local machine

Adds a hidden footer to the bottom of every text/html page containing a list of SQL queries executed, the view function that was used and all templates that were loaded. Each template path is a clickable URL of the type txmt://open/?url=file://FILENAME&line=LINENO as is the view function. This lets you open the file very quickly in TextMate which speeds up development considerably and relieves the mind of much fetching-lookup tedium. This version works on SVN 12002 (1.2 alpha) and earlier. The previous version was: http://www.djangosnippets.org/snippets/1033/ which got caught but some edge case in certain modules. It is based on the original by Simon http://www.djangosnippets.org/snippets/766/ To use save this as 'debug_middleware.py' somewhere on your PYTHONPATH and add 'debug_middleware.DebugFooter' to your MIDDLEWARE_CLASSES setting. - Felix (the Third) hey wouldn't it be great if you could retrieve your password on djangosnippets ? somebody should volunteer to upgrade it

  • middleware
  • debug
  • textmate
Read More

Email obfuscation filter using ROT13

An email address obfuscation template filter based on the ROT13 Encryption function in Textmate's HTML bundle. The filter should be applied to a string representing an email address. You can optionally pass the filter an argument that will be used as the email link text (otherwise it will simply use the email address itself). Example usage: {{ email_address|obfuscate:"Contact me!" }} or {{ email_address|obfuscate }} Of course, you can also use this on hardcoded email addresses, like this: {{ "[email protected]"|obfuscate }}

  • filter
  • javascript
  • email
  • textmate
  • obfuscation
  • rot13
Read More

DebugFooter middleware with textmate links

a minor remix of simon's debug footer: <http://www.djangosnippets.org/snippets/766/> > Adds a hidden footer to the bottom of every text/html page containing a list of SQL queries executed and templates that were loaded (including their full filesystem path to help debug complex template loading scenarios). This version adds TextMate links : if you are working on your local machine and using TextMate you can click on the template paths and they will be opened in TextMate. This speeds up development time considerably ! also, this works with django 1.0 (simon's version got broke by the 'connect' refactor) update: the view function is now linked > To use, drop in to a file called 'debug_middleware.py' on your Python path and add 'debug_middleware.DebugFooter' to your MIDDLEWARE_CLASSES setting.

  • middleware
  • debug
  • textmate
Read More

4 snippets posted so far.