mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 19:14:01 +03:00
Fix readme, add to CI (#5625)
* Add readme build to CI * Fix pandoc import in setup.py * Replace sponsor HTML with markdown This loses the image centering, but can be converted to RST. * Fix README RST conversion - Links do not render correctly inside italics - Add hr between image caption and section, fixes markup on older versions of pandoc.
This commit is contained in:
parent
abef84fb60
commit
fc6b192b70
|
@ -22,6 +22,10 @@ matrix:
|
||||||
- { python: "3.6", env: DJANGO=2.0 }
|
- { python: "3.6", env: DJANGO=2.0 }
|
||||||
- { python: "2.7", env: TOXENV=lint }
|
- { python: "2.7", env: TOXENV=lint }
|
||||||
- { python: "2.7", env: TOXENV=docs }
|
- { python: "2.7", env: TOXENV=docs }
|
||||||
|
- python: "2.7"
|
||||||
|
env: TOXENV=readme
|
||||||
|
addons:
|
||||||
|
apt_packages: pandoc
|
||||||
exclude:
|
exclude:
|
||||||
- { python: "2.7", env: DJANGO=master }
|
- { python: "2.7", env: DJANGO=master }
|
||||||
- { python: "2.7", env: DJANGO=2.0 }
|
- { python: "2.7", env: DJANGO=2.0 }
|
||||||
|
|
30
README.md
30
README.md
|
@ -15,20 +15,18 @@ Full documentation for the project is available at [http://www.django-rest-frame
|
||||||
|
|
||||||
REST framework is a *collaboratively funded project*. If you use
|
REST framework is a *collaboratively funded project*. If you use
|
||||||
REST framework commercially we strongly encourage you to invest in its
|
REST framework commercially we strongly encourage you to invest in its
|
||||||
continued development by **[signing up for a paid plan][funding]**.
|
continued development by [signing up for a paid plan][funding].
|
||||||
|
|
||||||
The initial aim is to provide a single full-time position on REST framework.
|
The initial aim is to provide a single full-time position on REST framework.
|
||||||
*Every single sign-up makes a significant impact towards making that possible.*
|
*Every single sign-up makes a significant impact towards making that possible.*
|
||||||
|
|
||||||
<p align="center">
|
[![][rover-img]][rover-url]
|
||||||
<a href="http://jobs.rover.com/"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rover-readme.png"/></a>
|
[![][sentry-img]][sentry-url]
|
||||||
<a href="https://getsentry.com/welcome/"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/sentry-readme.png"/></a>
|
[![][stream-img]][stream-url]
|
||||||
<a href="https://getstream.io/try-the-api/?utm_source=drf&utm_medium=banner&utm_campaign=drf"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/stream-readme.png"/></a>
|
[![][machinalis-img]][machinalis-url]
|
||||||
<a href="https://hello.machinalis.co.uk/"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/machinalis-readme.png"/></a>
|
[![][rollbar-img]][rollbar-url]
|
||||||
<a href="https://rollbar.com/"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rollbar-readme.png"/></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Rover](http://jobs.rover.com/), [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [Machinalis](https://hello.machinalis.co.uk/), and [Rollbar](https://rollbar.com/).*
|
Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Rover][rover-url], [Sentry][sentry-url], [Stream][stream-url], [Machinalis][machinalis-url], and [Rollbar][rollbar-url].
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -50,6 +48,8 @@ There is a live example API for testing purposes, [available here][sandbox].
|
||||||
|
|
||||||
![Screenshot][image]
|
![Screenshot][image]
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
# Requirements
|
# Requirements
|
||||||
|
|
||||||
* Python (2.7, 3.4, 3.5, 3.6)
|
* Python (2.7, 3.4, 3.5, 3.6)
|
||||||
|
@ -188,6 +188,18 @@ Send a description of the issue via email to [rest-framework-security@googlegrou
|
||||||
[funding]: https://fund.django-rest-framework.org/topics/funding/
|
[funding]: https://fund.django-rest-framework.org/topics/funding/
|
||||||
[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors
|
[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors
|
||||||
|
|
||||||
|
[rover-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rover-readme.png
|
||||||
|
[sentry-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/sentry-readme.png
|
||||||
|
[stream-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/stream-readme.png
|
||||||
|
[machinalis-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/machinalis-readme.png
|
||||||
|
[rollbar-img]: https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rollbar-readme.png
|
||||||
|
|
||||||
|
[rover-url]: http://jobs.rover.com/
|
||||||
|
[sentry-url]: https://getsentry.com/welcome/
|
||||||
|
[stream-url]: https://getstream.io/try-the-api/?utm_source=drf&utm_medium=banner&utm_campaign=drf
|
||||||
|
[machinalis-url]: https://hello.machinalis.co.uk/
|
||||||
|
[rollbar-url]: https://rollbar.com/
|
||||||
|
|
||||||
[oauth1-section]: http://www.django-rest-framework.org/api-guide/authentication/#django-rest-framework-oauth
|
[oauth1-section]: http://www.django-rest-framework.org/api-guide/authentication/#django-rest-framework-oauth
|
||||||
[oauth2-section]: http://www.django-rest-framework.org/api-guide/authentication/#django-oauth-toolkit
|
[oauth2-section]: http://www.django-rest-framework.org/api-guide/authentication/#django-oauth-toolkit
|
||||||
[serializer-section]: http://www.django-rest-framework.org/api-guide/serializers/#serializers
|
[serializer-section]: http://www.django-rest-framework.org/api-guide/serializers/#serializers
|
||||||
|
|
|
@ -9,3 +9,6 @@ transifex-client==0.11
|
||||||
|
|
||||||
# Pandoc to have a nice pypi page
|
# Pandoc to have a nice pypi page
|
||||||
pypandoc
|
pypandoc
|
||||||
|
|
||||||
|
# readme_renderer to check readme syntax
|
||||||
|
readme_renderer
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -9,10 +9,10 @@ from io import open
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from pypandoc import convert
|
from pypandoc import convert_file
|
||||||
|
|
||||||
def read_md(f):
|
def read_md(f):
|
||||||
return convert(f, 'rst')
|
return convert_file(f, 'rst')
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("warning: pypandoc module not found, could not convert Markdown to RST")
|
print("warning: pypandoc module not found, could not convert Markdown to RST")
|
||||||
|
|
||||||
|
|
9
tox.ini
9
tox.ini
|
@ -6,8 +6,8 @@ envlist =
|
||||||
{py27,py34,py35}-django110,
|
{py27,py34,py35}-django110,
|
||||||
{py27,py34,py35,py36}-django111,
|
{py27,py34,py35,py36}-django111,
|
||||||
{py34,py35,py36}-django20,
|
{py34,py35,py36}-django20,
|
||||||
{py35,py36}-djangomaster
|
{py35,py36}-djangomaster,
|
||||||
lint,docs
|
lint,docs,readme,
|
||||||
|
|
||||||
[travis:env]
|
[travis:env]
|
||||||
DJANGO =
|
DJANGO =
|
||||||
|
@ -42,3 +42,8 @@ commands = mkdocs build
|
||||||
deps =
|
deps =
|
||||||
-rrequirements/requirements-testing.txt
|
-rrequirements/requirements-testing.txt
|
||||||
-rrequirements/requirements-documentation.txt
|
-rrequirements/requirements-documentation.txt
|
||||||
|
|
||||||
|
[testenv:readme]
|
||||||
|
commands = ./setup.py check -rs
|
||||||
|
deps =
|
||||||
|
-rrequirements/requirements-packaging.txt
|
||||||
|
|
Loading…
Reference in New Issue
Block a user