Bumped up to version 2.0. Updated docs.

This commit is contained in:
Martin Mahner 2013-11-29 19:55:30 +01:00
parent f7f4f1b95c
commit 129be43b16
3 changed files with 37 additions and 16 deletions

View file

@ -1,35 +1,40 @@
======
dpaste
======
[![Build Status](https://travis-ci.org/bartTC/dpaste.png?branch=master)](https://travis-ci.org/bartTC/dpaste)
[![Coverage Status](https://coveralls.io/repos/bartTC/dpaste/badge.png?branch=master)](https://coveralls.io/r/bartTC/dpaste?branch=master)
.. image:: https://travis-ci.org/bartTC/dpaste.png?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
possible to be installed into an existing Django project like a regular app.
You can find a live example on http://dpaste.de/
-----------------------------
Testing and local development
-----------------------------
dpaste is continuously tested on [Travis][travis]. You can also run the test
suite locally with [tox][tox]:
dpaste is continuously tested on _Travis. You can also run the test
suite locally with _tox::
$ cd dpaste/
$ pip install tox
$ tox
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/
$ pip install -e .
$ pip install -r requirements.txt
$ python runtests.py
[travis]: https://travis-ci.org/bartTC/dpaste
[tox]: http://tox.readthedocs.org/en/latest/
_Travis: https://travis-ci.org/bartTC/dpaste
_tox: http://tox.readthedocs.org/en/latest/
-----------------------------------------
Integrate dpaste into an existing project
-----------------------------------------
@ -41,7 +46,7 @@ necessary dependencies of dpaste as well.
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 = (
'django.contrib.sessions',
@ -53,7 +58,7 @@ Add `dpaste` and (preferred) `south` to your `INSTALLED_APPS`:
# '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('',
# ...
@ -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')),
)
Finally just `syncdb` or if you use South, migrate:
Finally just ``syncdb`` or if you use South, migrate::
manage.py migrate dpaste
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
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.

View file

@ -8,9 +8,7 @@ requests==2.0.0
python-coveralls==2.4.0
coverage==3.7
tox==1.6.1
sphinx==1.1.3
sphinx_rtd_theme
markdown2==2.1.0
docutils
# Deployment specific
django-redis==3.3

View file

@ -3,7 +3,25 @@ from setuptools import setup, find_packages
setup(
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(),
package_data={'dpaste': ['static/*.*', 'templates/*.*']},
scripts=('manage.py',),