mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 16:12:51 +11:00
Upgraded to Django 1.5. Fixed urls and paths
This commit is contained in:
parent
e894fa7324
commit
4183c58cdd
6 changed files with 14 additions and 13 deletions
|
@ -7,13 +7,13 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>dpaste.de: {% block title %}{% trans "New snippet" %}{% endblock %}</title>
|
<title>dpaste.de: {% block title %}{% trans "New snippet" %}{% endblock %}</title>
|
||||||
<link rel="stylesheet" media="screen, projection" href="{{ STATIC_URL }}theme.css"/>
|
<link rel="stylesheet" media="screen, projection" href="{{ STATIC_URL }}dpaste/theme.css"/>
|
||||||
{% block extrahead %}{% endblock %}
|
{% block extrahead %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<span class="new_snippet"><a href="{% url snippet_new %}">{% trans "New snippet" %} →</a></span>
|
<span class="new_snippet"><a href="{% url "snippet_new" %}">{% trans "New snippet" %} →</a></span>
|
||||||
{% block headline %}{% endblock %}
|
{% block headline %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<a href="{% url snippet_userlist %}">{% trans "Recent snippets" %}</a>
|
<a href="{% url "snippet_userlist" %}">{% trans "Recent snippets" %}</a>
|
||||||
<a href="{% url snippet_userprefs %}">{% trans "Settings" %}</a>
|
<a href="{% url "snippet_userprefs" %}">{% trans "Settings" %}</a>
|
||||||
<a href="{% url about %}">{% trans "About" %}</a>
|
<a href="{% url "about" %}">{% trans "About" %}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% block script_footer %}
|
{% block script_footer %}
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<abbr title="{% trans "Time to life" %}">TTL:</abbr> {{ snippet.expires|timeuntil }}
|
<abbr title="{% trans "Time to life" %}">TTL:</abbr> {{ snippet.expires|timeuntil }}
|
||||||
—
|
—
|
||||||
{% if snippet.pk|in_list:request.session.snippet_list %}
|
{% if snippet.pk|in_list:request.session.snippet_list %}
|
||||||
<a onclick="return confirm('{% trans "Really delete this snippet?" %}')" href="{% url snippet_delete snippet.secret_id %}">Delete now!</a>
|
<a onclick="return confirm('{% trans "Really delete this snippet?" %}')" href="{% url "snippet_delete" snippet.secret_id %}">Delete now!</a>
|
||||||
—
|
—
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span id="toggleWordwrap"><input type="checkbox"/> <a href="#">{% trans "Wordwrap" %}</a></span>
|
<span id="toggleWordwrap"><input type="checkbox"/> <a href="#">{% trans "Wordwrap" %}</a></span>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
<h2>{% trans "History" %}</h2>
|
<h2>{% trans "History" %}</h2>
|
||||||
|
|
||||||
<form method="get" id="diffform" action="{% url snippet_diff %}">
|
<form method="get" id="diffform" action="{% url "snippet_diff" %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="tree">
|
<div class="tree">
|
||||||
{% for tree_item,structure in tree|tree_info %}
|
{% for tree_item,structure in tree|tree_info %}
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<h2>{% trans "Options" %}</h2>
|
<h2>{% trans "Options" %}</h2>
|
||||||
<p><a href="{% url snippet_details_raw snippet.secret_id %}">{% trans "View raw" %}</a></p>
|
<p><a href="{% url "snippet_details_raw" snippet.secret_id %}">{% trans "View raw" %}</a></p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block script_footer %}
|
{% block script_footer %}
|
||||||
|
@ -117,7 +117,7 @@ jQuery(document).ready(function(){
|
||||||
* Diff Ajax Call
|
* Diff Ajax Call
|
||||||
*/
|
*/
|
||||||
$("form#diffform").submit(function() {
|
$("form#diffform").submit(function() {
|
||||||
$.get("{% url snippet_diff %}", {
|
$.get("{% url "snippet_diff" %}", {
|
||||||
a: $("input[name=a]:checked").val(),
|
a: $("input[name=a]:checked").val(),
|
||||||
b: $("input[name=b]:checked").val()
|
b: $("input[name=b]:checked").val()
|
||||||
}, function(data){
|
}, function(data){
|
||||||
|
@ -162,7 +162,7 @@ jQuery(document).ready(function(){
|
||||||
* Lexer Guessing
|
* Lexer Guessing
|
||||||
*/
|
*/
|
||||||
$('#guess_lexer_btn').click(function(){
|
$('#guess_lexer_btn').click(function(){
|
||||||
$.getJSON('{% url snippet_guess_lexer %}',
|
$.getJSON('{% url "snippet_guess_lexer" %}',
|
||||||
{'codestring': $('#id_content').val()},
|
{'codestring': $('#id_content').val()},
|
||||||
function(data){
|
function(data){
|
||||||
if(data.lexer == "unknown"){
|
if(data.lexer == "unknown"){
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
jQuery(document).ready(function(){
|
jQuery(document).ready(function(){
|
||||||
{% if request.session.userprefs.display_all_lexer %}
|
{% if request.session.userprefs.display_all_lexer %}
|
||||||
$('#guess_lexer_btn').click(function(){
|
$('#guess_lexer_btn').click(function(){
|
||||||
$.getJSON('{% url snippet_guess_lexer %}',
|
$.getJSON('{% url "snippet_guess_lexer" %}',
|
||||||
{'codestring': $('#id_content').val()},
|
{'codestring': $('#id_content').val()},
|
||||||
function(data){
|
function(data){
|
||||||
if(data.lexer == "unknown"){
|
if(data.lexer == "unknown"){
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
from django.conf.urls.defaults import url, patterns, include
|
from django.conf.urls.defaults import url, patterns, include
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from django.views.generic import TemplateView
|
||||||
|
|
||||||
admin.autodiscover()
|
admin.autodiscover()
|
||||||
|
|
||||||
urlpatterns = patterns(
|
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'^admin/', include(admin.site.urls)),
|
||||||
url(r'^', include('dpaste.urls.dpaste_api')),
|
url(r'^', include('dpaste.urls.dpaste_api')),
|
||||||
url(r'^', include('dpaste.urls.dpaste')),
|
url(r'^', include('dpaste.urls.dpaste')),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
django==1.3
|
django==1.5
|
||||||
django-mptt==0.4.2
|
django-mptt==0.4.2
|
||||||
django-piston==0.2.2
|
django-piston==0.2.2
|
||||||
pygments==1.4
|
pygments==1.4
|
||||||
|
|
Loading…
Reference in a new issue