diff --git a/dpaste/static/theme.css b/dpaste/static/dpaste/theme.css similarity index 100% rename from dpaste/static/theme.css rename to dpaste/static/dpaste/theme.css diff --git a/dpaste/templates/dpaste/base.html b/dpaste/templates/dpaste/base.html index 4e33b02..3e3521c 100644 --- a/dpaste/templates/dpaste/base.html +++ b/dpaste/templates/dpaste/base.html @@ -7,13 +7,13 @@ dpaste.de: {% block title %}{% trans "New snippet" %}{% endblock %} - + {% block extrahead %}{% endblock %} @@ -27,9 +27,9 @@ {% block script_footer %} diff --git a/dpaste/templates/dpaste/snippet_details.html b/dpaste/templates/dpaste/snippet_details.html index a2ffd0a..e42eb2d 100644 --- a/dpaste/templates/dpaste/snippet_details.html +++ b/dpaste/templates/dpaste/snippet_details.html @@ -34,7 +34,7 @@ TTL: {{ snippet.expires|timeuntil }} — {% if snippet.pk|in_list:request.session.snippet_list %} - Delete now! + Delete now! — {% endif %} {% trans "Wordwrap" %} @@ -67,7 +67,7 @@ {% block sidebar %}

{% trans "History" %}

-
+ {% csrf_token %}
{% for tree_item,structure in tree|tree_info %} @@ -92,7 +92,7 @@

{% trans "Options" %}

-

{% trans "View raw" %}

+

{% trans "View raw" %}

{% endblock %} {% block script_footer %} @@ -117,7 +117,7 @@ jQuery(document).ready(function(){ * Diff Ajax Call */ $("form#diffform").submit(function() { - $.get("{% url snippet_diff %}", { + $.get("{% url "snippet_diff" %}", { a: $("input[name=a]:checked").val(), b: $("input[name=b]:checked").val() }, function(data){ @@ -162,7 +162,7 @@ jQuery(document).ready(function(){ * Lexer Guessing */ $('#guess_lexer_btn').click(function(){ - $.getJSON('{% url snippet_guess_lexer %}', + $.getJSON('{% url "snippet_guess_lexer" %}', {'codestring': $('#id_content').val()}, function(data){ if(data.lexer == "unknown"){ diff --git a/dpaste/templates/dpaste/snippet_new.html b/dpaste/templates/dpaste/snippet_new.html index 3229af8..4a93f22 100644 --- a/dpaste/templates/dpaste/snippet_new.html +++ b/dpaste/templates/dpaste/snippet_new.html @@ -21,7 +21,7 @@ jQuery(document).ready(function(){ {% if request.session.userprefs.display_all_lexer %} $('#guess_lexer_btn').click(function(){ - $.getJSON('{% url snippet_guess_lexer %}', + $.getJSON('{% url "snippet_guess_lexer" %}', {'codestring': $('#id_content').val()}, function(data){ if(data.lexer == "unknown"){ diff --git a/dpaste/urls/__init__.py b/dpaste/urls/__init__.py index ee31aae..25b8fd5 100644 --- a/dpaste/urls/__init__.py +++ b/dpaste/urls/__init__.py @@ -1,11 +1,12 @@ from django.conf.urls.defaults import url, patterns, include from django.contrib import admin +from django.views.generic import TemplateView admin.autodiscover() urlpatterns = patterns( '', - url(r'^about/$', 'django.views.generic.simple.direct_to_template', {'template': 'about.html'}, name='about'), + url(r'^about/$', TemplateView.as_view(template_name='dpaste/about.html'), name='about'), url(r'^admin/', include(admin.site.urls)), url(r'^', include('dpaste.urls.dpaste_api')), url(r'^', include('dpaste.urls.dpaste')), diff --git a/requirements.txt b/requirements.txt index 0b80541..05bfa19 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -django==1.3 +django==1.5 django-mptt==0.4.2 django-piston==0.2.2 pygments==1.4