From a1ae0cca67589fcd884122a6b335af66be949eb9 Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Tue, 10 Dec 2019 15:18:42 -0800 Subject: [PATCH] Fixing README so Pypi is happy --- MANIFEST.in | 2 +- README.md | 31 +++++++++++++++++++++++++++++++ README.rst | 41 ----------------------------------------- setup.py | 3 ++- tasks.py | 1 + 5 files changed, 35 insertions(+), 43 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/MANIFEST.in b/MANIFEST.in index 2b78f29..0eb86b3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include setup.py README.rst MANIFEST.in LICENSE +include setup.py README.md MANIFEST.in LICENSE diff --git a/README.md b/README.md new file mode 100644 index 0000000..e0f7fe8 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# django-sudo + +[![](https://travis-ci.org/mattrobenolt/django-sudo.svg?branch=master)](https://travis-ci.org/mattrobenolt/django-sudo) [![](https://coveralls.io/repos/mattrobenolt/django-sudo/badge.png?branch=master)](https://coveralls.io/r/mattrobenolt/django-sudo?branch=master) + +> Sudo mode is an extra layer of security for your most sensitive pages.
+> This is an implementation of GitHub's [Sudo Mode](https://github.com/blog/1513-introducing-github-sudo-mode) for [Django](https://www.djangoproject.com/). + +## What is this for? + +`django-sudo` provides an extra layer of security for after a user is already logged in. Views can +be decorated with `@sudo_required`, and then a user +must re-enter their password to view that page. After verifying their password, that user has +elevated permissions for the duration of `SUDO_COOKIE_AGE`. This duration is independent of the +normal session duration allowing short elevated permission durations, but retain long user sessions. + +## Installation + +```console +$ pip install django-sudo +``` + +## Compatibility + +* Django 1.9-1.10 +* Python 2.7, 3.6-3.7 + +## Resources + +* [Documentation](https://django-sudo.readthedocs.io/) +* [Security](https://django-sudo.readthedocs.io/en/latest/security/index.html) +* [Changelog](https://django-sudo.readthedocs.io/en/latest/changelog/index.html) diff --git a/README.rst b/README.rst deleted file mode 100644 index f8103d8..0000000 --- a/README.rst +++ /dev/null @@ -1,41 +0,0 @@ -django-sudo -=========== - -.. image:: https://travis-ci.org/mattrobenolt/django-sudo.svg?branch=master - :target: https://travis-ci.org/mattrobenolt/django-sudo - -.. image:: https://coveralls.io/repos/mattrobenolt/django-sudo/badge.png?branch=master - :target: https://coveralls.io/r/mattrobenolt/django-sudo?branch=master - -.. - - | Sudo mode is an extra layer of security for your most sensitive pages. - This is an implementation of GitHub's `Sudo Mode - `_ for `Django - `_. - -What is this for? -~~~~~~~~~~~~~~~~~ -``django-sudo`` provides an extra layer of security for after a user is already logged in. Views can -be decorated with ``@sudo_required``, and then a user -must re-enter their password to view that page. After verifying their password, that user has -elevated permissions for the duration of ``SUDO_COOKIE_AGE``. This duration is independent of the -normal session duration allowing short elevated permission durations, but retain long user sessions. - -Installation -~~~~~~~~~~~~ - -.. code-block:: console - - $ pip install django-sudo - -Compatibility -~~~~~~~~~~~~~ -* Django 1.9-1.10 -* Python 2.7, 3.6-3.7 - -Resources -~~~~~~~~~ -* `Documentation `_ -* `Security `_ -* `Changelog `_ diff --git a/setup.py b/setup.py index 97094c0..f8ff766 100755 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ install_requires = [] -with open('README.rst') as f: +with open('README.md') as f: long_description = f.read() @@ -23,6 +23,7 @@ description='Extra security for your sensitive pages', license='BSD', long_description=long_description, + long_description_content_type='text/markdown', packages=find_packages(exclude=['tests']), install_requires=install_requires, zip_safe=True, diff --git a/tasks.py b/tasks.py index edd18b1..bacb717 100644 --- a/tasks.py +++ b/tasks.py @@ -35,4 +35,5 @@ def release(): run('git push --tags') run('python setup.py sdist bdist_wheel') + run('twine check dist/*') run('twine upload -s dist/*')