Django application contain swagger-ui static files
Project description
django-static-swagger-ui
Django application contain swagger-ui static files
Install
pip install django-static-swagger-ui
License
- All resource files of static/swagger-ui are dist folder unzip from swagger-ui-x.xx.x.zip which download from https://github.com/swagger-api/swagger-ui/releases without any changes.
- All resource files of static/swagger-ui obey swagger-ui License, see details at https://github.com/swagger-api/swagger-ui/blob/master/LICENSE.
- We don't guarantee the latest swagger-ui version.
Settings
pro/settings.py
INSTALLED_APPS = [
...
"django_static_swagger_ui",
...
]
Use static files
swagger-ui.html
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>{% load staticfiles %}
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="{% static "swagger-ui/swagger-ui.css" %}" />
<link rel="stylesheet" type="text/css" href="{% static "swagger-ui/index.css" %}" />
<link rel="icon" type="image/png" href="{% static "swagger-ui/favicon-32x32.png" %}" sizes="32x32" />
<link rel="icon" type="image/png" href="{% static "swagger-ui/favicon-16x16.png" %}" sizes="16x16" />
</head>
<body>
<div id="swagger-ui"></div>
<script src="{% static "swagger-ui/swagger-ui-bundle.js" %}" charset="UTF-8"> </script>
<script src="{% static "swagger-ui/swagger-ui-standalone-preset.js" %}" charset="UTF-8"> </script>
<script src="{% static "swagger-ui/swagger-initializer.js" %}" charset="UTF-8"> </script>
</body>
</html>
About releases
- The first three number is the same with swagger-ui project's version.
- The fourth number is our release number, it's optional.
Releases
v4.14.0.2
- First release.
- Using swagger-ui v4.14.0.
v4.19.0.0
- Upgrade to swagger-ui v4.19.0.
v4.19.1.0
- Upgrade to swagger-ui v4.19.1.
v5.4.2.0
- Upgrade to swagger-ui v5.4.2.
v5.6.2.0
- Upgrade to swagger-ui v5.6.2.
v5.17.14.0
- Upgrade to swagger-ui v5.17.14.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-static-swagger-ui-5.17.14.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 422bdf2525ba525aa65dbcfa2b65c7429fbe71c8583b3de2934d8b6bd8596a69 |
|
MD5 | 34b3675ce74d5ccb46ae6a3f04bc38b5 |
|
BLAKE2b-256 | fa6a0fbede12af887a2b2cd0567d14bf36b8f7c9800873c1feeb56604824b930 |
Close
Hashes for django_static_swagger_ui-5.17.14.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c816a82953678858567065b43e0ff82a4cd40a60d6666a30287dad2c46bb0f6c |
|
MD5 | 0598a0417f33bfc2479f4e0f95e9c6d9 |
|
BLAKE2b-256 | 51c8b88e011220fbcb66fe79f7881e7d5a50fd355a1c43fd9f44f8fc4c79eb61 |