Login

Tag "paste"

Snippet List

Interactive debugger and other Paste niceties

runserver with extra development tools: 1. interactive debugger that pops up automatically if an exception occurs, courtesy of [Werkzeug](http://werkzeug.pocoo.org/documentation/dev/debug.html#using-the-debugger) 2. logging of print statements directly into HTML (div float), courtesy of [Paste](http://pythonpaste.org/modules/debug.prints.html). Credits: [piranha.org.ua](http://piranha.org.ua/)

  • print
  • django
  • debugging
  • paste
  • wsgi
  • werkzeug
Read More

Copy/Paste form generation

Generator to help make newforms classes a bit like inspectdb does for generating rough model code. This is a standalone script to go in your project directory with settings.py and called from the prompt. It looks up the model, and generates code to copy/paste into your app. Hopefully to make a building a custom form with a lot of fields a little easier. Every argument should be a model identifier of form appname.modelname. Usage from the command line: python form_gen myapp.MyModel myapp.MyOtherModel

  • form
  • copy
  • generator
  • paste
Read More

2 snippets posted so far.