mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-23 11:56:36 +11:00
Bumped up to version 2.0. Updated docs.
This commit is contained in:
parent
f7f4f1b95c
commit
129be43b16
3 changed files with 37 additions and 16 deletions
|
@ -1,35 +1,40 @@
|
||||||
|
======
|
||||||
dpaste
|
dpaste
|
||||||
======
|
======
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/bartTC/dpaste.png?branch=master)](https://travis-ci.org/bartTC/dpaste)
|
.. image:: https://travis-ci.org/bartTC/dpaste.png?branch=master
|
||||||
[![Coverage Status](https://coveralls.io/repos/bartTC/dpaste/badge.png?branch=master)](https://coveralls.io/r/bartTC/dpaste?branch=master)
|
:target: https://travis-ci.org/bartTC/dpaste
|
||||||
|
.. image:: https://coveralls.io/repos/bartTC/dpaste/badge.png?branch=master
|
||||||
|
:target: https://coveralls.io/r/bartTC/dpaste?branch=master
|
||||||
|
|
||||||
dpaste is a Django based pastebin. It's intended to run separately but its also
|
dpaste is a Django based pastebin. It's intended to run separately but its also
|
||||||
possible to be installed into an existing Django project like a regular app.
|
possible to be installed into an existing Django project like a regular app.
|
||||||
|
|
||||||
You can find a live example on http://dpaste.de/
|
You can find a live example on http://dpaste.de/
|
||||||
|
|
||||||
|
-----------------------------
|
||||||
Testing and local development
|
Testing and local development
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
dpaste is continuously tested on [Travis][travis]. You can also run the test
|
dpaste is continuously tested on _Travis. You can also run the test
|
||||||
suite locally with [tox][tox]:
|
suite locally with _tox::
|
||||||
|
|
||||||
$ cd dpaste/
|
$ cd dpaste/
|
||||||
$ pip install tox
|
$ pip install tox
|
||||||
$ tox
|
$ tox
|
||||||
|
|
||||||
A more manual approach is installing it all by hand in a virtual environment.
|
A more manual approach is installing it all by hand in a virtual environment.
|
||||||
This is also the preferred way to setup an environment for local development:
|
This is also the preferred way to setup an environment for local development::
|
||||||
|
|
||||||
$ cd dpaste/
|
$ cd dpaste/
|
||||||
$ pip install -e .
|
$ pip install -e .
|
||||||
$ pip install -r requirements.txt
|
$ pip install -r requirements.txt
|
||||||
$ python runtests.py
|
$ python runtests.py
|
||||||
|
|
||||||
[travis]: https://travis-ci.org/bartTC/dpaste
|
_Travis: https://travis-ci.org/bartTC/dpaste
|
||||||
[tox]: http://tox.readthedocs.org/en/latest/
|
_tox: http://tox.readthedocs.org/en/latest/
|
||||||
|
|
||||||
|
-----------------------------------------
|
||||||
Integrate dpaste into an existing project
|
Integrate dpaste into an existing project
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
|
@ -41,7 +46,7 @@ necessary dependencies of dpaste as well.
|
||||||
|
|
||||||
pip install https://github.com/bartTC/dpaste
|
pip install https://github.com/bartTC/dpaste
|
||||||
|
|
||||||
Add `dpaste` and (preferred) `south` to your `INSTALLED_APPS`:
|
Add `dpaste` and (preferred) `south` to your `INSTALLED_APPS`::
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
|
@ -53,7 +58,7 @@ Add `dpaste` and (preferred) `south` to your `INSTALLED_APPS`:
|
||||||
# 'south', (supported)
|
# 'south', (supported)
|
||||||
)
|
)
|
||||||
|
|
||||||
Add `dpaste` and if you want the `dpaste_api` to your urlpatterns:
|
Add ``dpaste`` and if you want the ``dpaste_api`` to your urlpatterns::
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
# ...
|
# ...
|
||||||
|
@ -62,14 +67,14 @@ Add `dpaste` and if you want the `dpaste_api` to your urlpatterns:
|
||||||
url(r'pastebin/api/', include('dpaste.urls.dpaste_api')),
|
url(r'pastebin/api/', include('dpaste.urls.dpaste_api')),
|
||||||
)
|
)
|
||||||
|
|
||||||
Finally just `syncdb` or if you use South, migrate:
|
Finally just ``syncdb`` or if you use South, migrate::
|
||||||
|
|
||||||
manage.py migrate dpaste
|
manage.py migrate dpaste
|
||||||
|
|
||||||
Do not forget to setup a cron job to purge expired snippets. You need to
|
Do not forget to setup a cron job to purge expired snippets. You need to
|
||||||
run the management command `cleanup_snippets`. A cron job I use looks like:
|
run the management command ``cleanup_snippets``. A cron job I use looks like::
|
||||||
|
|
||||||
30 * * * * /srv/dpaste.de/bin/python /srv/dpaste.de/bin/manage.py cleanup_snippets > /dev/null
|
30 * * * * /srv/dpaste.de/bin/python /srv/dpaste.de/bin/manage.py cleanup_snippets > /dev/null
|
||||||
|
|
||||||
Note also that dpaste does *not* come with Django admin integration. You need
|
Note also that dpaste does *not* come with Django admin integration. You need
|
||||||
to setup an register the models in an `admin.py` yourself.
|
to setup an register the models in an ``admin.py`` yourself.
|
|
@ -8,9 +8,7 @@ requests==2.0.0
|
||||||
python-coveralls==2.4.0
|
python-coveralls==2.4.0
|
||||||
coverage==3.7
|
coverage==3.7
|
||||||
tox==1.6.1
|
tox==1.6.1
|
||||||
sphinx==1.1.3
|
docutils
|
||||||
sphinx_rtd_theme
|
|
||||||
markdown2==2.1.0
|
|
||||||
|
|
||||||
# Deployment specific
|
# Deployment specific
|
||||||
django-redis==3.3
|
django-redis==3.3
|
||||||
|
|
20
setup.py
20
setup.py
|
@ -3,7 +3,25 @@ from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='dpaste',
|
name='dpaste',
|
||||||
version='1.9',
|
version='2.0',
|
||||||
|
description='dpaste is a Django based pastebin. It\'s intended to run '
|
||||||
|
'separately but its also possible to be installed into an '
|
||||||
|
'existing Django project like a regular app.',
|
||||||
|
long_description=open('README.rst').read(),
|
||||||
|
author='Martin Mahner',
|
||||||
|
author_email='martin@mahner.org',
|
||||||
|
url='https://github.com/bartTC/dpaste/',
|
||||||
|
|
||||||
|
classifiers=(
|
||||||
|
'Development Status :: 5 - Production/Stable',
|
||||||
|
'Environment :: Web Environment',
|
||||||
|
'Intended Audience :: Developers',
|
||||||
|
'License :: OSI Approved :: MIT License',
|
||||||
|
'Operating System :: OS Independent',
|
||||||
|
'Programming Language :: Python',
|
||||||
|
'Framework :: Django',
|
||||||
|
),
|
||||||
|
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
package_data={'dpaste': ['static/*.*', 'templates/*.*']},
|
package_data={'dpaste': ['static/*.*', 'templates/*.*']},
|
||||||
scripts=('manage.py',),
|
scripts=('manage.py',),
|
||||||
|
|
Loading…
Reference in a new issue