further cleanup

This commit is contained in:
Martin Mahner 2017-03-18 14:08:36 +01:00
parent 95aca3588d
commit 54de452f19
14 changed files with 16 additions and 22 deletions

View file

@ -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'),
}

View file

@ -1,3 +1,5 @@
from __future__ import unicode_literals
import datetime
from django import forms

View file

@ -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 _

View file

@ -1,3 +1,5 @@
from __future__ import unicode_literals
from random import SystemRandom
from django.conf import settings

View file

@ -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 %}

View file

@ -1,7 +1,6 @@
{% extends "dpaste/base.html" %}
{% load i18n %}
{% load dpaste_tags %}
{% block title %}Snippet History{% endblock %}
{% block headline %}Snippet History{% endblock %}

View file

@ -1,9 +0,0 @@
from django.template import Library
register = Library()
@register.filter
def in_list(value, arg):
return value in arg

View file

@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.test import TestCase

View file

@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from datetime import timedelta

View file

@ -1,3 +1,5 @@
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import url

View file

@ -1,3 +1,5 @@
from __future__ import unicode_literals
from django.conf.urls import url
from ..views import APIView

View file

@ -1,3 +1,5 @@
from __future__ import unicode_literals
import datetime
import difflib
import json

View file

@ -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',
],
},
},