Code

Opened 8 years ago

Closed 7 years ago

#2437 closed enhancement (fixed)

[patch] Quick Copy to pastebin

Reported by: dummy@… Owned by: ekarulf
Component: Uncategorized Version: master
Severity: normal Keywords: pastebin, sprintsept14, sprintdec1
Cc: erik@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: UI/UX:

Description

Hi,

I read that there is an "little, easy improvements" open. Since the owner was 'just starting' I tried it myself and thought that it wasn't really difficult to solve.

Regards,
Dirk

Attachments (5)

debug-pastebin.patch (1.1 KB) - added by dummy@… 8 years ago.
Quick Copy to pastebin
django_dpaste.diff (1.6 KB) - added by Simon G. <dev@…> 7 years ago.
django_dpaste-2.diff (3.1 KB) - added by ekarulf 7 years ago.
Updated to include some extra environment information
django-dpaste-prettified.diff (3.4 KB) - added by xian 7 years ago.
django-dpaste-prettified-2.diff (4.5 KB) - added by ekarulf 7 years ago.
Updated the prettified code per some recommendations from fellow sprinters

Download all attachments as: .zip

Change History (21)

Changed 8 years ago by dummy@…

Quick Copy to pastebin

comment:1 Changed 8 years ago by adrian

Very cool. I think we'll set up a pastebin on djangoproject.com, and point this patch at it, rather than relying on pastebin.com, because pastebin.com has been flaky lately.

comment:2 Changed 8 years ago by anonymous

  • Summary changed from Quick Copy to pastebin to [patch] Quick Copy to pastebin

comment:3 Changed 8 years ago by Chris Rose <chris@…>

Its worth noting that the source for pastebin.com is GPL and can be obtained from http://pastebin.com/pastebin.tar.gz, however I suspect any tool used on the djangoproject.com site will be developed with Django :p

comment:4 Changed 8 years ago by Marek Kubica

The pastebin at paste.e-scribe.com is in fact written in Python using Django (source available) and highlights all kinds of Django-related code like Python, Python-Transcripts (interactive Python) and Django-templates. Quite nice.

comment:5 follow-up: Changed 7 years ago by Simon G. <dev@…>

  • Component changed from Admin interface to Uncategorized
  • Keywords pastebin added
  • Owner changed from adrian to jacob
  • Triage Stage changed from Unreviewed to Accepted

This has been in the Quick Easy improvements page in the wiki for years.

comment:6 in reply to: ↑ 5 Changed 7 years ago by Marc Fargas <telenieko@…>

Replying to Simon G. <dev@simon.net.nz>:

This has been in the Quick Easy improvements page in the wiki for years.

And it's on it's way to be "Accepted" for years! :P
If the patch is ok, why isn't it "Ready for checkin" ?

On the other side, I'd rather place a big box telling that pressing the button you're about to publish your traceback on a public site ;)

comment:7 Changed 7 years ago by adrian

The reason we're waiting on this is because the patch uses pastebin.com, whereas it should use Django's custom pastebin (or maybe dpaste). Django doesn't have a custom pastebin on djangoproject.com, but we might be able to use dpaste.com if Paul B. is willing to commit to maintaining it.

comment:8 Changed 7 years ago by Paul Bx <pb@…>

Sorry for the lag. Simon G and I have now exchanged email about this -- consider me commited.

Changed 7 years ago by Simon G. <dev@…>

comment:9 Changed 7 years ago by Simon G. <dev@…>

I've attached a patch which modifies the original from dummy (at) habmalnefrage.de to use dpaste. Note that this also escapes a few other values in debug.py that should be escaped.

@ Paul Bx: I've added a a "source" parameter which you can use to track stats.

comment:10 Changed 7 years ago by Fredrik Lundh <fredrik@…>

  • Keywords pastebin, sprintsept14 added; pastebin removed
  • Triage Stage changed from Accepted to Ready for checkin

comment:11 Changed 7 years ago by mtredinnick

  • Patch needs improvement set
  • Triage Stage changed from Ready for checkin to Accepted

I was this close to committing this, but then I tried it out first. Unfortunately, it's not very visually appealing. On Firefox, at least, the button gets a bit lost in amongst all the traceback text.

We also probably need a short (one sentence?) description of what will happen when you push the button. Something like "this will send the traceback to a public website so you can share it with others. You will have a chance to confirm the paste before it is made public" -- but use better wording. I agree with Marc Fargas that some explanation is probably necessary.

However, making it look less crushed together is the real priority here. We always win "prettiest debug page" at the country fair and adding this would hurt our chances. Apart from that, it's good.

comment:12 Changed 7 years ago by ekarulf

  • Cc erik@… added
  • Keywords sprintsept14, sprintnov29 added; sprintsept14 removed
  • Owner changed from nobody to ekarulf
  • Status changed from new to assigned

Assuming Fredrik/Simon doesn't mind, I'll pretty this up at the November 29th sprint.

Changed 7 years ago by ekarulf

Updated to include some extra environment information

comment:13 Changed 7 years ago by ekarulf

  • Keywords sprintdec1 added; sprintnov29 removed

The patch also removes some extraneous text (per Jacob's recommended)

Changed 7 years ago by xian

comment:14 Changed 7 years ago by xian

django-dpaste-prettified.diff is up and it prettifies everything and fixes some usability/extra code bits in the earlier patches.

comment:15 Changed 7 years ago by jacob

  • Triage Stage changed from Accepted to Ready for checkin

Changed 7 years ago by ekarulf

Updated the prettified code per some recommendations from fellow sprinters

comment:16 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6820]) Fixed #2437, #6091 -- Added "paste to dpaste" button to debug page. Thanks,
Christian Metts, Erik Karulf, Simon Greenhill, dummy@….

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.