Changes between Initial Version and Version 1 of Ticket #22639, comment 2


Ignore:
Timestamp:
May 16, 2014, 12:02:43 PM (10 years ago)
Author:
niclas.ahden

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22639, comment 2

    initial v1  
    1 Before your comment we had a short discussion with bmispelon about this and agreed that adding a brief guideline to the contributor documentation would be good. The general rule being that snippets should preferably be safe to copy and paste.
     1'''The first time a concept is introduced in a section, it probably makes sense to include all imports, but if the example is tweaked later, I don't think the imports need to be repeated.'''
     2Agreed
    23
    3 What do you think?
     4'''If there are spots that bother you right now, feel free to send a PR. Otherwise, I don't think we need to keep a ticket open for this.'''
     5Will do
     6
     7'''We'll never be able to make all code snippets safe to copy and paste because examples have example dependencies like from myapp.models import Article.'''
     8Couldn't we use dot-imports for those in almost all cases?
     9
     10Before your comment we had a short discussion with bmispelon about this and agreed that adding a brief guideline to the contributor documentation would be good. The general rule being that snippets should preferably be safe to copy and paste. What do you think?
Back to Top