https://github.com/amikrop/django-paste
Pluggable, configurable, pastebin HTTP REST API
https://github.com/amikrop/django-paste
django django-rest-framework pastebin pygments python python3 rest-api
Last synced: 6 months ago
JSON representation
Pluggable, configurable, pastebin HTTP REST API
- Host: GitHub
- URL: https://github.com/amikrop/django-paste
- Owner: amikrop
- License: mit
- Created: 2020-11-06T11:51:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-27T15:13:02.000Z (almost 2 years ago)
- Last Synced: 2024-11-27T23:31:15.360Z (about 1 year ago)
- Topics: django, django-rest-framework, pastebin, pygments, python, python3, rest-api
- Language: Python
- Homepage: https://pypi.org/project/django-paste/
- Size: 52.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
django-paste
============
Pluggable, configurable, pastebin HTTP REST API
-----------------------------------------------
.. image:: https://img.shields.io/pypi/v/django-paste.svg
:target: https://pypi.org/project/django-paste/
:alt: PyPI
.. image:: https://img.shields.io/pypi/l/django-paste.svg
:target: https://pypi.org/project/django-paste/
:alt: PyPI - License
.. image:: https://img.shields.io/pypi/pyversions/django-paste.svg
:target: https://pypi.org/project/django-paste/
:alt: PyPI - Python Version
.. image:: https://codecov.io/gh/amikrop/django-paste/branch/master/graph/
badge.svg
:target: https://codecov.io/gh/amikrop/django-paste/
:alt: Coverage
.. image:: https://readthedocs.org/projects/django-paste/badge/?version=latest
:target: https://django-paste.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
*django-paste* is a simple `Django `_
pluggable app of a code pasting and highlighting HTTP REST API, written using
`Django REST framework `_. It supports
the `CRUD `_
operations on source code snippets and uses any existing user authentication
system. Syntax highlighting is powered by `Pygments
`_.
Installation
------------
The following Python versions are supported:
- CPython: 3.6, 3.7, 3.8, 3.9
- PyPy: 3.6
Django:
- 2.0, 2.1, 2.2
- 3.0, 3.1
- Install via `pip
`_:
.. code-block:: bash
$ pip install django-paste
- Add it to your ``INSTALLED_APPS``:
.. code-block:: python
INSTALLED_APPS = [
# ...
'paste.apps.PasteConfig',
]
- Register the app's URLs under a path of your choice:
.. code-block:: python
urlpatterns = [
# ...
path('some-path/', include('paste.urls')),
]
where ``'some-path/'`` could be any URL.
- Optionally, configure the app `settings
`_.
- Generate and run the database migrations:
.. code-block:: bash
$ python manage.py makemigrations paste
$ python manage.py migrate
Usage
-----
You can find the description of the app's `endpoints
`_ and
snippet `fields `_
in the `documentation `_. You
can also manage snippets at the Django admin site.
License
-------
Distributed under the `MIT License
`_.