Russ, 2007/7/20, Russell Keith-Magee <[EMAIL PROTECTED]>:
> > The Django debug HTML page is great for finding bugs in templates and > > view functions. However, if you have an error in a view function with > > a request object that contains a - say - 200MB file object, well, then > > your browser dies a slow and painful death. At least my trusted > > Firefox does. > > To the best of my knowledge, this isn't currently configurable. > However, it sounds like a reasonable suggestion. Feel free to log a > ticket. Or even a fix, if you're feeling so enthused. It shouldn't be > too difficult to implement. Done. See http://code.djangoproject.com/ticket/4947 > > And I wish it would be possible to edit the shown code just in place > > :) What I know about Python so far, this should be possible, > > shouldn't it? If you can load and display the source code, you must be > > able to save a modified version to the same location... > > This is probably a little harder than you think. You have to get the > code back up to the server, and reload the module. Oh, it would be sufficient IMHO if it would work for the development server and only if started in localhost mode :) > Depending on how > you are deployed, you may need to restart a web server. Plus, you've > just exposed a live, editable connection to your source code - which > is a teeny tiny security risk :-) The debug view is already giving away too much information for a production mode so I'd consider this risk quite manageable. Here's a more serious idea: Add an "edit" link to each frame, pointing to a /debug/edit/<file>/<line>/ URL that will be configured as part of the site "urls.py" file. A simple view method will simply spawn a new editor. Because I don't really know what to return from that view, it will work best with a bit of Ajax. -- Stefan Matthias Aust --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---