mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
further cleanup
This commit is contained in:
parent
95aca3588d
commit
54de452f19
14 changed files with 16 additions and 22 deletions
|
@ -1,8 +0,0 @@
|
|||
from django.conf import settings
|
||||
|
||||
def dpaste_globals(request):
|
||||
return {
|
||||
'site_name': getattr(settings, 'DPASTE_SITE_NAME', 'dpaste.de'),
|
||||
'jquery_url': getattr(settings, 'DPASTE_JQUERY_URL',
|
||||
'https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js'),
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import datetime
|
||||
|
||||
from django import forms
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.template.defaultfilters import escape
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from random import SystemRandom
|
||||
|
||||
from django.conf import settings
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{% extends "dpaste/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load dpaste_tags %}
|
||||
|
||||
{% block title %}{% trans "Snippet" %} #{{ snippet.pk }}{% endblock %}
|
||||
{% block headline_wrapper %}
|
||||
|
@ -39,9 +38,7 @@
|
|||
{% trans "One-Time snippet" %}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% if snippet.pk|in_list:request.session.snippet_list %}
|
||||
<a class="btn" href="{% url "snippet_delete" snippet.secret_id %}" onclick="return confirm('{% trans "Really delete this snippet?" %}');"><i class="icon-trash"></i> {% trans "Delete Now" %}</a>
|
||||
{% endif %}
|
||||
{% if snippet.parent %}
|
||||
<a class="btn snippet-diff-trigger" href="#snippet-diff"><i class="icon-search"></i> {% trans "Compare this Answer" %}</a>
|
||||
{% endif %}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{% extends "dpaste/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load dpaste_tags %}
|
||||
|
||||
{% block title %}Snippet History{% endblock %}
|
||||
{% block headline %}Snippet History{% endblock %}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
from django.template import Library
|
||||
|
||||
register = Library()
|
||||
|
||||
@register.filter
|
||||
def in_list(value, arg):
|
||||
return value in arg
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.test import TestCase
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from ..views import APIView
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import datetime
|
||||
import difflib
|
||||
import json
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import sys
|
||||
|
||||
from django.conf import settings
|
||||
|
@ -26,7 +28,6 @@ SETTINGS = {
|
|||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.template.context_processors.i18n',
|
||||
'dpaste.context_processors.dpaste_globals',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue