From d27fda8c1685c1752e6d24dc2af9deeb189d55d5 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Mon, 9 Feb 2015 15:46:01 -0200 Subject: [PATCH] Removed dpaste dependency --- colab/static/dpaste/css/theme.css | 212 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- colab/templates/dpaste/base.html | 16 ---------------- colab/templates/dpaste/snippet_details.html | 207 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- colab/templates/dpaste/snippet_diff.html | 14 -------------- colab/templates/dpaste/snippet_form.html | 33 --------------------------------- colab/templates/dpaste/snippet_new.html | 7 ------- setup.py | 4 ++-- 7 files changed, 2 insertions(+), 491 deletions(-) delete mode 100644 colab/static/dpaste/css/theme.css delete mode 100644 colab/templates/dpaste/base.html delete mode 100644 colab/templates/dpaste/snippet_details.html delete mode 100644 colab/templates/dpaste/snippet_diff.html delete mode 100644 colab/templates/dpaste/snippet_form.html delete mode 100644 colab/templates/dpaste/snippet_new.html diff --git a/colab/static/dpaste/css/theme.css b/colab/static/dpaste/css/theme.css deleted file mode 100644 index 5da06ca..0000000 --- a/colab/static/dpaste/css/theme.css +++ /dev/null @@ -1,212 +0,0 @@ - -.shortcut { - color: #AAA; - font-size: 13px; - font-weight: 300; - margin-left: 15px; -} - -.form-horizontal .form-group { - margin: 0 0 20px 0; -} - -#id_content{ - width: 100%; - font-family: monospace; - font-size: 14px; - line-height: 16px; -} - -/* ---------------------------------------------------------------------------- - Snippet Details ----------------------------------------------------------------------------- */ -#snippet-diff { - display: none; -} -.snippet-options{ - margin-bottom: 20px; -} - -.snippet-reply { - margin-top: 30px; -} - -.snippet-reply-hidden { - opacity: 0.3; -} - -.snippet-reply-hidden, -.snippet-reply-hidden *{ - cursor: pointer; -} - -.snippet-diff-form { -} - -.snippet-rendered { - color: #666; - font-size: 16px; - line-height: 24px; - max-width: 620px; - font-family: Helvetica, FreeSerif, serif; - font-weight: 300; -} -.diff-form { -/* margin-bottom: 10px;*/ -} - -#diff { - margin-bottom: 10px; -/* display: none;*/ -} - -.tree{ - width: 100%; - line-height: 1.8em; -} - -.tree ul, -.tree ul li{ - margin: 0; - padding: 0; - list-style: none; -} - -.tree ul li{ - color: #ccc; - clear: both; -} - -.tree ul li div{ - border-bottom: 1px solid #EEE; -} - -.tree strong{ - color: #111; - font-weight: normal; -} - -.tree ul li li{ - padding-left: 0; - margin-left: 15px; - color: #ccc; - list-style: circle; -} - -/* ---------------------------------------------------------------------------- - .code ----------------------------------------------------------------------------- */ - -.code { - width: 100%; - background: #232829; - color: #f8f8f2; - padding: 20px 30px !important; - border-radius: 0; - padding: 20px 30px; - font-family: Monaco,Menlo,Consolas,"Courier New",monospace; -} - -.code.wordwrap { - overflow: auto; - white-space: nowrap; -} - -.code ol { - margin: 0 0 0 45px; -} - -.code ol li { - color: #aaa; - font-size: 12px; - line-height: 21px; - cursor: pointer; - padding-left: 5px; -} - -.code ol li.marked { - color: #f4e009; - background-color: #4f4800; - margin-right: -30px; - padding-right: 30px; -} - -/* ---------------------------------------------------------------------------- - Pygments ----------------------------------------------------------------------------- */ - -.code .gd { color: #FF494F; display: block; } -.code .gi { color: #53C64A; display: block; } - -.code .hll { background-color: #49483e } -.code .c { color: #75715e } /* Comment */ -.code .err { color: #960050; background-color: #1e0010 } /* Error */ -.code .k { color: #66d9ef } /* Keyword */ -.code .l { color: #ae81ff } /* Literal */ -.code .n { color: #f8f8f2 } /* Name */ -.code .o { color: #f92672 } /* Operator */ -.code .p { color: #f8f8f2 } /* Punctuation */ -.code .cm { color: #75715e } /* Comment.Multiline */ -.code .cp { color: #75715e } /* Comment..codeproc */ -.code .c1 { color: #75715e } /* Comment.Single */ -.code .cs { color: #75715e } /* Comment.Special */ -.code .ge { font-style: italic } /* Generic.Emph */ -.code .gs { font-weight: bold } /* Generic.Strong */ -.code .kc { color: #66d9ef } /* Keyword.Constant */ -.code .kd { color: #66d9ef } /* Keyword.Declaration */ -.code .kn { color: #f92672 } /* Keyword.Namespace */ -.code .kp { color: #66d9ef } /* Keyword.Pseudo */ -.code .kr { color: #66d9ef } /* Keyword.Reserved */ -.code .kt { color: #66d9ef } /* Keyword.Type */ -.code .ld { color: #e6db74 } /* Literal.Date */ -.code .m { color: #ae81ff } /* Literal.Number */ -.code .s { color: #e6db74 } /* Literal.String */ -.code .na { color: #a6e22e } /* Name.Attribute */ -.code .nb { color: #f8f8f2 } /* Name.Builtin */ -.code .nc { color: #a6e22e } /* Name.Class */ -.code .no { color: #66d9ef } /* Name.Constant */ -.code .nd { color: #a6e22e } /* Name.Decorator */ -.code .ni { color: #f8f8f2 } /* Name.Entity */ -.code .ne { color: #a6e22e } /* Name.Exception */ -.code .nf { color: #a6e22e } /* Name.Function */ -.code .nl { color: #f8f8f2 } /* Name.Label */ -.code .nn { color: #f8f8f2 } /* Name.Namespace */ -.code .nx { color: #a6e22e } /* Name.Other */ -.code .py { color: #f8f8f2 } /* Name.Property */ -.code .nt { color: #f92672 } /* Name.Tag */ -.code .nv { color: #f8f8f2 } /* Name.Variable */ -.code .ow { color: #f92672 } /* Operator.Word */ -.code .w { color: #f8f8f2 } /* Text.Whitespace */ -.code .mf { color: #ae81ff } /* Literal.Number.Float */ -.code .mh { color: #ae81ff } /* Literal.Number.Hex */ -.code .mi { color: #ae81ff } /* Literal.Number.Integer */ -.code .mo { color: #ae81ff } /* Literal.Number.Oct */ -.code .sb { color: #e6db74 } /* Literal.String.Backtick */ -.code .sc { color: #e6db74 } /* Literal.String.Char */ -.code .sd { color: #e6db74 } /* Literal.String.Doc */ -.code .s2 { color: #e6db74 } /* Literal.String.Double */ -.code .se { color: #ae81ff } /* Literal.String.Escape */ -.code .sh { color: #e6db74 } /* Literal.String.Heredoc */ -.code .si { color: #e6db74 } /* Literal.String.Interpol */ -.code .sx { color: #e6db74 } /* Literal.String.Other */ -.code .sr { color: #e6db74 } /* Literal.String.Regex */ -.code .s1 { color: #e6db74 } /* Literal.String.Single */ -.code .ss { color: #e6db74 } /* Literal.String.Symbol */ -.code .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ -.code .vc { color: #f8f8f2 } /* Name.Variable.Class */ -.code .vg { color: #f8f8f2 } /* Name.Variable.Global */ -.code .vi { color: #f8f8f2 } /* Name.Variable.Instance */ -.code .il { color: #ae81ff } /* Literal.Number.Integer.Long */ - - -/* ---------------------------------------------------------------------------- - Mobile ----------------------------------------------------------------------------- */ - -@media (max-width: 580px) { - .form-options-expire { - float: left; - clear: left; - margin-top: 10px; - } -} diff --git a/colab/templates/dpaste/base.html b/colab/templates/dpaste/base.html deleted file mode 100644 index 550dea9..0000000 --- a/colab/templates/dpaste/base.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends 'base.html' %} -{% load static from staticfiles %} - -{% block head_css %} - -{% endblock %} - -{% block header %} -

Paste

-{% endblock %} - -{% block main-content %} -{% block page %}{% endblock %} -{% endblock %} - -{% block footer_js %}{% endblock %} diff --git a/colab/templates/dpaste/snippet_details.html b/colab/templates/dpaste/snippet_details.html deleted file mode 100644 index 3cd9764..0000000 --- a/colab/templates/dpaste/snippet_details.html +++ /dev/null @@ -1,207 +0,0 @@ -{% extends "dpaste/base.html" %} - -{% load mptt_tags %} -{% load i18n %} -{% load dpaste_tags %} - -{% block page %} - -{# Snippet options #} - - -
-
- -
-
-
- {% csrf_token %} -
- {% for tree_item,structure in tree|tree_info %} - {% if structure.new_level %}
  • {% else %}
  • {% endif %} -
    - - - - - {% ifequal snippet tree_item %} - #{{ tree_item.id }} - {% else %} - #{{ tree_item.id }} - {% endifequal %} -
    - {% for level in structure.closed_levels %}
{% endfor %} - {% endfor %} -
-
- -
-
-
-
- - -
- - {% if snippet.expire_type == 1 %} - {% blocktrans with date=snippet.expires|timeuntil %}Expires in: {{ date }}{% endblocktrans %} - {% elif snippet.expire_type == 2 %} - {% trans "Snippet never expires" %} - {% elif snippet.expire_type == 3 %} - {% trans "One-time snippet" %} - {% endif %} - - - {% if snippet.pk|in_list:request.session.snippet_list %} - - - {% trans "Delete Now" %} - - {% endif %} - - {% if not snippet.is_single %} - - - {% trans "Compare Snippets" %} - - {% endif %} - - - - {% trans "View Raw" %} - - - - {% trans "Gist" %} - - - New snippet - - -
- - - {% if snippet.expire_type == 3 %} -
- - - {% trans "This is a one-time snippet." %} - {% if snippet.remaining_views > 1 %} - {% trans "It will automatically get deleted after {{ remaining }} further views." %} - {% elif snippet.remaining_views == 1 %} - {% trans "It will automatically get deleted after the next view." %} - {% else %} - {% trans "It cannot be viewed again." %} - {% endif %} -
- {% endif %} - - {% if snippet.lexer == 'text' %} -
- {{ snippet.content|linebreaksbr }} -
- {% else %} - {% include "dpaste/snippet_pre.html" %} - {% endif %} - - {% if not snippet.expire_type == 3 %} -
-

{% trans "Reply to this snippet" %} →

- {% include "dpaste/snippet_form.html" %} -
- {% endif %} - - - -{% block footer_js %} - -{% endblock %} -{% endblock %} diff --git a/colab/templates/dpaste/snippet_diff.html b/colab/templates/dpaste/snippet_diff.html deleted file mode 100644 index 86bcdb5..0000000 --- a/colab/templates/dpaste/snippet_diff.html +++ /dev/null @@ -1,14 +0,0 @@ -{% load i18n %} -{% load url from future %} - -

- {% blocktrans with fileA.get_absolute_url as filea_url and fileB.get_absolute_url as fileb_url and fileA.id as filea_id and fileB.id as fileb_id %} - Diff between #{{ filea_id }} and #{{ fileb_id }} - {% endblocktrans %} -

- -{% if snippet.lexer == 'diff' %} - {% include "dpaste/snippet_pre.html" %} -{% else %} -

{{ snippet.content }}

-{% endif %} diff --git a/colab/templates/dpaste/snippet_form.html b/colab/templates/dpaste/snippet_form.html deleted file mode 100644 index adf22f4..0000000 --- a/colab/templates/dpaste/snippet_form.html +++ /dev/null @@ -1,33 +0,0 @@ -{% load i18n %} - -
- {% csrf_token %} - {{ snippet_form.non_field_errors }} - -
- {{ snippet_form.content }} -
- -
- -
- {{ snippet_form.lexer }} -
- -
-
- - {{ snippet_form.expires }} -
- -
-
- -
-
- - Ctrl+⏎ ou ⌘+⏎ -
-
- -
diff --git a/colab/templates/dpaste/snippet_new.html b/colab/templates/dpaste/snippet_new.html deleted file mode 100644 index 648240b..0000000 --- a/colab/templates/dpaste/snippet_new.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends 'dpaste/base.html' %} - -{% load i18n %} - -{% block page %} - {% include "dpaste/snippet_form.html" %} -{% endblock %} diff --git a/setup.py b/setup.py index 271ece4..3c81db5 100644 --- a/setup.py +++ b/setup.py @@ -48,8 +48,8 @@ REQUIREMENTS = [ # Diazo 'diazo==1.0.5', - # Dpaste - 'dpaste==2.8', + # Mailman 2 REST API + 'mailman-api==0.2.9', ] TEST_REQUIREMENTS = [ -- libgit2 0.21.2