Moved domain from dpaste.de to dpaste.org

This changes docs and some readme file
This commit is contained in:
Darren 2021-12-27 16:00:53 +00:00
parent 6b1e2d9df5
commit 1069ab8007
7 changed files with 233 additions and 16 deletions

View file

@ -228,5 +228,5 @@ Huge release. Full cleanup and update of the entire codebase. Details:
---------------- ----------------
- A huge cleanup and nearly total rewrite. - A huge cleanup and nearly total rewrite.
- dpaste now includes a Django project which is used on www.dpaste.de - dpaste now includes a Django project which is used on www.dpaste.org
as well as hooks to get it integrated into existing projcts. as well as hooks to get it integrated into existing projcts.

View file

@ -19,10 +19,10 @@ dpaste
📖 Full documentation on https://dpaste.readthedocs.io/ 📖 Full documentation on https://dpaste.readthedocs.io/
dpaste is a pastebin_ application written in Python using the Django dpaste is a pastebin_ application written in Python using the Django
framework. You can find a live installation on `dpaste.de`_. framework. You can find a live installation on `dpaste.org`_.
.. image:: https://raw.githubusercontent.com/bartTC/dpaste/master/docs/_static/dpaste_de_screenshot.png .. image:: https://raw.githubusercontent.com/bartTC/dpaste/master/docs/_static/dpaste_de_screenshot.png
:alt: A screenshot of https://dpaste.de/ :alt: A screenshot of https://dpaste.org/
:width: 60% :width: 60%
The project is intended to run standalone as any regular Django Project, The project is intended to run standalone as any regular Django Project,
@ -35,5 +35,5 @@ please create an *Issue* there.
⚠️ dpaste requires at a minimum Python 3.6 and Django 2.2. ⚠️ dpaste requires at a minimum Python 3.6 and Django 2.2.
.. _dpaste.de: https://dpaste.de/ .. _dpaste.org: https://dpaste.org/
.. _pastebin: https://en.wikipedia.org/wiki/Pastebin .. _pastebin: https://en.wikipedia.org/wiki/Pastebin

View file

@ -17,9 +17,9 @@ do is a simple ``POST`` request to the API endpoint, usually ``/api/``:
.. code-block:: bash .. code-block:: bash
$ curl -X POST -F "format=url" -F "content=ABC" https:/dpaste.de/api/ $ curl -X POST -F "format=url" -F "content=ABC" https:/dpaste.org/api/
Host: dpaste.de Host: dpaste.org
User-Agent: curl/7.54.0 User-Agent: curl/7.54.0
Accept: */* Accept: */*
@ -29,7 +29,7 @@ do is a simple ``POST`` request to the API endpoint, usually ``/api/``:
{ {
"lexer": "python", "lexer": "python",
"url": "https://dpaste.de/EBKU", "url": "https://dpaste.org/EBKU",
"content": "ABC" "content": "ABC"
} }
@ -42,10 +42,10 @@ do is a simple ``POST`` request to the API endpoint, usually ``/api/``:
:form format: (optional) The format of the API response. Choices are: :form format: (optional) The format of the API response. Choices are:
* ``default`` — Returns a full qualified URL wrapped in quotes. * ``default`` — Returns a full qualified URL wrapped in quotes.
Example: ``"https://dpaste.de/xsWd"`` Example: ``"https://dpaste.org/xsWd"``
* ``url`` — Returns the full qualified URL to the snippet, without surrounding * ``url`` — Returns the full qualified URL to the snippet, without surrounding
quotes, but with a line break. Example: ``https://dpaste.de/xsWd\n`` quotes, but with a line break. Example: ``https://dpaste.org/xsWd\n``
* ``json`` — Returns a JSON object containing the URL, lexer and content of the * ``json`` — Returns a JSON object containing the URL, lexer and content of the
the snippet. Example: the snippet. Example:
@ -53,7 +53,7 @@ do is a simple ``POST`` request to the API endpoint, usually ``/api/``:
.. code-block:: json .. code-block:: json
{ {
"url": "https://dpaste.de/xsWd", "url": "https://dpaste.org/xsWd",
"lexer": "python", "lexer": "python",
"content": "The text body of the snippet." "content": "The text body of the snippet."
} }
@ -79,7 +79,7 @@ do is a simple ``POST`` request to the API endpoint, usually ``/api/``:
.. code-block:: json .. code-block:: json
{ {
"url": "https://dpaste.de/xsWd", "url": "https://dpaste.org/xsWd",
"lexer": "", "lexer": "",
"filename": "python", "filename": "python",
"content": "The text body of the snippet." "content": "The text body of the snippet."
@ -90,7 +90,7 @@ do is a simple ``POST`` request to the API endpoint, usually ``/api/``:
.. code-block:: json .. code-block:: json
{ {
"url": "https://dpaste.de/xsWd", "url": "https://dpaste.org/xsWd",
"lexer": "php", "lexer": "php",
"filename": "python", "filename": "python",
"content": "The text body of the snippet." "content": "The text body of the snippet."

View file

@ -15,5 +15,5 @@ Documentation
api api
changelog changelog
.. _dpaste.de: https://dpaste.de/ .. _dpaste.org: https://dpaste.org/
.. _pastebin: https://en.wikipedia.org/wiki/Pastebin .. _pastebin: https://en.wikipedia.org/wiki/Pastebin

View file

@ -35,7 +35,7 @@ A crontab line might look like:
.. code-block:: bash .. code-block:: bash
1 20 * * * /srv/dpaste.de/pipenv run manage.py cleanup_snippets > /dev/null 1 20 * * * /srv/dpaste.org/pipenv run manage.py cleanup_snippets > /dev/null
.. note:: If you use the *database* session backend, you may also need to setup .. note:: If you use the *database* session backend, you may also need to setup

View file

@ -624,7 +624,7 @@ class dpasteAppConfig(AppConfig):
String. The full qualified hostname and path to the dpaste instance. String. The full qualified hostname and path to the dpaste instance.
This is used to generate a link in the API response. If the "Sites" This is used to generate a link in the API response. If the "Sites"
framework is installed, it uses the current Site domain. Otherwise framework is installed, it uses the current Site domain. Otherwise
it falls back to 'https://dpaste.de' it falls back to 'https://dpaste.org'
""" """
if apps.is_installed("django.contrib.sites"): if apps.is_installed("django.contrib.sites"):
from django.contrib.sites.shortcuts import get_current_site from django.contrib.sites.shortcuts import get_current_site

219
package-lock.json generated
View file

@ -1,8 +1,225 @@
{ {
"name": "dpaste", "name": "dpaste",
"version": "3.0.0", "version": "3.0.0",
"lockfileVersion": 1, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": {
"": {
"name": "dpaste",
"version": "3.0.0",
"license": "MIT",
"dependencies": {
"sass": "^1.15.2",
"uglify-es": "^3.3.10"
}
},
"node_modules/anymatch": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
"integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
"dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/binary-extensions": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
"integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
"engines": {
"node": ">=8"
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dependencies": {
"fill-range": "^7.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/chokidar": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz",
"integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==",
"dependencies": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.2.0"
},
"engines": {
"node": ">= 8.10.0"
},
"optionalDependencies": {
"fsevents": "~2.1.1"
}
},
"node_modules/commander": {
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz",
"integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw=="
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dependencies": {
"to-regex-range": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/fsevents": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz",
"integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==",
"deprecated": "\"Please update to latest v2.3 or v2.2\"",
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dependencies": {
"binary-extensions": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-glob": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"dependencies": {
"is-extglob": "^2.1.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/picomatch": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz",
"integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==",
"engines": {
"node": ">=8.6"
}
},
"node_modules/readdirp": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz",
"integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==",
"dependencies": {
"picomatch": "^2.0.4"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/sass": {
"version": "1.23.7",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.23.7.tgz",
"integrity": "sha512-cYgc0fanwIpi0rXisGxl+/wadVQ/HX3RhpdRcjLdj2o2ye/sxUTpAxIhbmJy3PLQgRFbf6Pn8Jsrta2vdXcoOQ==",
"dependencies": {
"chokidar": ">=2.0.0 <4.0.0"
},
"bin": {
"sass": "sass.js"
},
"engines": {
"node": ">=8.9.0"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dependencies": {
"is-number": "^7.0.0"
},
"engines": {
"node": ">=8.0"
}
},
"node_modules/uglify-es": {
"version": "3.3.10",
"resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.10.tgz",
"integrity": "sha512-rPzPisCzW68Okj1zNrfa2dR9uEm43SevDmpR6FChoZABFk9dANGnzzBMgHYUXI3609//63fnVkyQ1SQmAMyjww==",
"deprecated": "support for ECMAScript is superseded by `uglify-js` as of v3.13.0",
"dependencies": {
"commander": "~2.14.1",
"source-map": "~0.6.1"
},
"bin": {
"uglifyjs": "bin/uglifyjs"
},
"engines": {
"node": ">=0.8.0"
}
}
},
"dependencies": { "dependencies": {
"anymatch": { "anymatch": {
"version": "3.1.1", "version": "3.1.1",