Skip to content

Commit 0cbedee

Browse files
committed
read the docs
1 parent 18e1159 commit 0cbedee

17 files changed

+838
-398
lines changed

.github/workflows/python-package.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
push:
88
branches: [ master, dev ]
99
pull_request:
10-
branches: [ master ]
10+
branches: [ master, dev ]
1111

1212
jobs:
1313
build:
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
python-version: [3.8]
19-
django-version: ["2.2", "3.0"]
19+
django-version: ["2.2", "3.0", "3.1"]
2020

2121
steps:
2222
- uses: actions/checkout@v2

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ build/
1717
dist/
1818
*__pycache__*
1919
*.coverage
20+
docs/build/*

.readthedocs.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: docs/source/conf.py
11+
12+
# Build documentation with MkDocs
13+
#mkdocs:
14+
# configuration: mkdocs.yml
15+
16+
# Optionally build your docs in additional formats such as PDF and ePub
17+
formats: all
18+
19+
# Optionally set the version of Python and requirements required to build your docs
20+
python:
21+
version: 3.8
22+
install:
23+
- requirements: requirements-docs.txt

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
djangosaml2
2+
===========
3+
4+
![CI build](https://github.com/peppelinu/djangosaml2/workflows/djangosaml2/badge.svg)
5+
![Python version](https://img.shields.io/badge/license-Apache%202-blue.svg)
6+
![License](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9-blue.svg)
7+
8+
9+
A Django application that builds a Fully Compliant SAML2 Service Provider on top of PySAML2 library.
10+
Djangosaml2 protects your project with a SAML2 SSO Authentication, it
11+
will talk SAML2 with your Identity Provider allowing you to use this authentication mechanism.
12+
This document will guide you through a few simple steps to accomplish such goal.
13+
14+
15+
Please consult the `official Documentation of djangosaml2 <>`_ to get started.
16+
17+
18+
Contributing
19+
============
20+
21+
Please open Issues to start debate regarding the requested
22+
features, or the patch that you would apply. We do not use
23+
a strict submission format, please try to be more concise as possibile.
24+
25+
The Pull Request MUST be done on the dev branch, please don't
26+
push code directly on the master branch.
27+
28+
29+
Special thanks
30+
==============
31+
32+
The story of this project is a community-driven project, born as a
33+
fork of another project and maintained by different authors at different times, such as:
34+
35+
36+
- [Lorenzo Gil Sanchez](https://github.com/lorenzogil)
37+
- [Jozef knaperek](https://github.com/knaperek)
38+
- me
39+
40+
A special thank to Jozef for having maintained this project with passion and diligence until the birth of version v1.0 and not least for allowing me to take the reins of all this.
41+
A special thank to [Mathieu Hinderyckx](https://github.com/mhindery) for having give an important contribution to v1.0.
42+
I'd like to thank all the contributors, one by one, for the color and creativity with which they have enriched this project and will continue to do so.

docs/Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/_static/custom.css

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
body,
2+
h1, h2,
3+
.rst-content .toctree-wrapper p.caption,
4+
h3, h4, h5, h6,
5+
legend{
6+
font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;
7+
}
8+
9+
.wy-side-nav-search{
10+
background: #ffffff;
11+
}
12+
13+
.wy-side-nav-search>a,
14+
.wy-side-nav-search .wy-dropdown>a{
15+
color: #9b9c9e;
16+
font-weight: normal;
17+
}
18+
19+
.wy-menu-vertical header,
20+
.wy-menu-vertical p.caption{
21+
color: #fff;
22+
font-size:85%;
23+
}
24+
25+
.wy-nav-top{
26+
background: #fff;
27+
border-bottom: 1px solid #f7f5f5;
28+
}
29+
30+
.wy-nav-top a{
31+
display: block;
32+
color: #9b9c9e;
33+
font-weight: normal;
34+
}
35+
36+
.wy-nav-top i{
37+
color: #BE0417;
38+
}
39+
40+
.wy-nav-top img{
41+
border-radius: 0;
42+
background: none;
43+
width: 65%;
44+
}
45+
46+
img{
47+
height: auto !important;
48+
}
49+
50+
.document{
51+
text-align: justify;
52+
}
53+
54+
h1{
55+
text-align: left;
56+
}
57+
58+
#logo_main{
59+
margin-bottom: 0;
60+
}
61+
62+
#title_under_logo{
63+
margin-bottom: 1em;
64+
}
65+
66+
.alert-danger {
67+
color: #721c24;
68+
background-color: #f8d7da;
69+
border-color: #f5c6cb;
70+
}
71+
.alert-primary {
72+
color: #004085;
73+
background-color: #cce5ff;
74+
border-color: #b8daff;
75+
}
76+
.alert {
77+
position: relative;
78+
padding: .75rem 1.25rem;
79+
margin-bottom: 1rem;
80+
border: 1px solid transparent;
81+
border-radius: .25rem;
82+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<footer>
2+
{% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
3+
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
4+
{% if next %}
5+
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right"></span></a>
6+
{% endif %}
7+
{% if prev %}
8+
<a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> {{ _('Previous') }}</a>
9+
{% endif %}
10+
</div>
11+
{% endif %}
12+
13+
<hr/>
14+
15+
<div role="contentinfo">
16+
<p>
17+
{%- if show_copyright %}
18+
{%- if hasdoc('copyright') %}
19+
{% trans path=pathto('copyright'), copyright=copyright|e %}{{ copyright }}.{% endtrans %}
20+
{%- else %}
21+
{% trans copyright=copyright|e %}{{ copyright }}.{% endtrans %}
22+
{%- endif %}
23+
{%- endif %}
24+
25+
{%- if build_id and build_url %}
26+
{% trans build_url=build_url, build_id=build_id %}
27+
<span class="build">
28+
Build
29+
<a href="{{ build_url }}">{{ build_id }}</a>.
30+
</span>
31+
{% endtrans %}
32+
{%- elif commit %}
33+
{% trans commit=commit %}
34+
<span class="commit">
35+
Revision <code>{{ commit }}</code>.
36+
</span>
37+
{% endtrans %}
38+
{%- elif last_updated %}
39+
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
40+
{%- endif %}
41+
42+
</p>
43+
</div>
44+
45+
<span style="font-size:0.8em">
46+
{%- if show_sphinx %}
47+
{% trans %}Built with <a href="http://sphinx-doc.org/">Sphinx</a>{% endtrans %}.
48+
{%- endif %}
49+
50+
{%- block extrafooter %}
51+
{% endblock %}
52+
</span>
53+
</footer>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{% extends "!layout.html" %}
2+
3+
{% block extrahead %}
4+
<link href="{{ pathto('_static/custom.css', True) }}" rel="stylesheet" type="text/css">
5+
<link rel="shortcut icon" href="{{ pathto('_static/favicon.ico', True) }}">
6+
{% endblock %}
7+
8+
<!-- LOGO TEMPLATE OVERLOAD -->
9+
10+
{% block sidebartitle %}
11+
12+
{% if logo %}
13+
{# Not strictly valid HTML, but it's the only way to display/scale
14+
it properly, without weird scripting or heaps of work
15+
#}
16+
<a href="{{ pathto(master_doc) }}" id="logo_main"><img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="Logo" /></a>
17+
{% endif %}
18+
19+
{% if logo and theme_logo_only %}
20+
<a id="title_under_logo" href="{{ pathto(master_doc) }}">
21+
{% else %}
22+
<a id="title_under_logo" href="{{ pathto(master_doc) }}"> {{ project }}
23+
{% endif %}
24+
</a>
25+
26+
{% if theme_display_version %}
27+
{%- set nav_version = version %}
28+
{% if READTHEDOCS and current_version %}
29+
{%- set nav_version = current_version %}
30+
{% endif %}
31+
{% if nav_version %}
32+
<div class="version">
33+
{{ nav_version }}
34+
</div>
35+
{% endif %}
36+
{% endif %}
37+
38+
{% include "searchbox.html" %}
39+
40+
{% endblock %}
41+
42+
43+
44+
<!-- MOBILE TOP BAR OVERLOAD -->
45+
{% block mobile_nav %}
46+
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
47+
<a href="{{ pathto(master_doc) }}">
48+
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="Logo"/>
49+
</a>
50+
<a href="{{ pathto(master_doc) }}">
51+
{{ project }}
52+
</a>
53+
{% endblock %}

docs/source/conf.py

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
from recommonmark.parser import CommonMarkParser
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'djangosaml2'
21+
copyright = '2020, Giuseppe De Marco'
22+
author = 'Giuseppe De Marco'
23+
24+
# The full version, including alpha/beta/rc tags
25+
release = '0.2.4'
26+
27+
28+
# -- General configuration ---------------------------------------------------
29+
30+
# Add any Sphinx extension module names here, as strings. They can be
31+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32+
# ones.
33+
extensions = ['sphinxcontrib.images', 'recommonmark']
34+
35+
# Add any paths that contain templates here, relative to this directory.
36+
templates_path = ['_templates/pplnx_template']
37+
# html_logo = "_static/logo.svg"
38+
39+
# List of patterns, relative to source directory, that match files and
40+
# directories to ignore when looking for source files.
41+
# This pattern also affects html_static_path and html_extra_path.
42+
exclude_patterns = []
43+
44+
45+
# -- Options for HTML output -------------------------------------------------
46+
47+
# The theme to use for HTML and HTML Help pages. See the documentation for
48+
# a list of builtin themes.
49+
#
50+
html_theme = 'sphinx_rtd_theme'
51+
# Add any paths that contain custom static files (such as style sheets) here,
52+
# relative to this directory. They are copied after the builtin static files,
53+
# so a file named "default.css" will overwrite the builtin "default.css".
54+
html_static_path = ['_static']
55+
56+
source_suffix = ['.rst', '.md']

0 commit comments

Comments
 (0)