mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-12-23 23:23:06 +11:00
Little code cleanup.
This commit is contained in:
parent
9593853696
commit
04fefe15a6
5 changed files with 4 additions and 9 deletions
|
@ -33,6 +33,7 @@ LEXER_WORDWRAP = ('text', 'rst')
|
|||
class NakedHtmlFormatter(HtmlFormatter):
|
||||
def wrap(self, source, outfile):
|
||||
return self._wrap_code(source)
|
||||
|
||||
def _wrap_code(self, source):
|
||||
for i, t in source:
|
||||
yield i, t
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import datetime
|
||||
import sys
|
||||
from optparse import make_option
|
||||
from django.core.management.base import CommandError, LabelCommand
|
||||
from django.core.management.base import LabelCommand
|
||||
from dpaste.models import Snippet
|
||||
|
||||
class Command(LabelCommand):
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
import datetime
|
||||
import difflib
|
||||
import random
|
||||
import mptt
|
||||
import re
|
||||
from django.db import models
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.db.models import permalink
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from dpaste.highlight import LEXER_DEFAULT, pygmentize
|
||||
from dpaste.highlight import LEXER_DEFAULT
|
||||
|
||||
t = 'abcdefghijkmnopqrstuvwwxyzABCDEFGHIJKLOMNOPQRSTUVWXYZ1234567890'
|
||||
def generate_secret_id(length=5):
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
__version__ = '0.1'
|
|
@ -1,12 +1,10 @@
|
|||
from django.template import Library
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
from dpaste.highlight import pygmentize
|
||||
|
||||
register = Library()
|
||||
|
||||
@register.filter
|
||||
def in_list(value,arg):
|
||||
def in_list(value, arg):
|
||||
return value in arg
|
||||
|
||||
@register.filter
|
||||
|
|
Loading…
Reference in a new issue