You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of the time I'm looking at the context of templates, the next step is top paste it into an editor for reasons[1] - especially including pasting into a python shell or notebook to explore.
At the moment it's inconvenient: You have to manually select the data - making it easy to select things that aren't the context data, and the data isn't exactly in a useable format ready to paste into a python list.
See this example - the first and second items are not comma separated and there is no start and end bracket.:
It would be nice to have a "Copy to clipboard" button, perhaps that floats in the top right of the context.
It would also be good if the text was in a format that was likely to work in a python shell, but maybe that is a slightly different issue (at the
[1] - scrolling up and down in the browser is less convenient with everything there, searching is more fiddly etc
The text was updated successfully, but these errors were encountered:
This is a solid idea. I suspect we need to print the !r version rather than the string version. The copy logic should be manageable. I believe the Django error page does this for the stacktrace already.
@stuaxo do you have the availability to create a PR?
Something that's not entirely clear is what exactly are you hoping to copy and paste? The examples in the original issue are valid python dictionaries.
A lot of the time I'm looking at the context of templates, the next step is top paste it into an editor for reasons[1] - especially including pasting into a python shell or notebook to explore.
At the moment it's inconvenient: You have to manually select the data - making it easy to select things that aren't the context data, and the data isn't exactly in a useable format ready to paste into a python list.
See this example - the first and second items are not comma separated and there is no start and end bracket.:
It would be nice to have a "Copy to clipboard" button, perhaps that floats in the top right of the context.
It would also be good if the text was in a format that was likely to work in a python shell, but maybe that is a slightly different issue (at the
[1] - scrolling up and down in the browser is less convenient with everything there, searching is more fiddly etc
The text was updated successfully, but these errors were encountered: