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.
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
File details
Details for the file django-static-swagger-ui-4.19.1.0.tar.gz
.
File metadata
- Download URL: django-static-swagger-ui-4.19.1.0.tar.gz
- Upload date:
- Size: 2.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54f25a10a1596ab5aee81ad0cf10f05cd436a3801cb5edbb313ddc4c7e89806b |
|
MD5 | d0aba5284381d056e8c987b85fb57d80 |
|
BLAKE2b-256 | 754187581d6c0d5b71cf0030f56bf5afa99032a3bdf7331db1372b82bdb8e79c |
File details
Details for the file django_static_swagger_ui-4.19.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_static_swagger_ui-4.19.1.0-py3-none-any.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19568e33eca9dcf7cc940c36b0c224b5162501609143b58ed0df37ef52fad553 |
|
MD5 | 40c82e1a1a0ad330936876f6342227f9 |
|
BLAKE2b-256 | 9fed3d343fc2f7930956e0f7670d8e9d0dacd4cb101858e839e38516b937e8d5 |