Skip to main content

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

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.

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

django-static-swagger-ui-4.14.0.2.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-static-swagger-ui-4.14.0.2.tar.gz.

File metadata

File hashes

Hashes for django-static-swagger-ui-4.14.0.2.tar.gz
Algorithm Hash digest
SHA256 5d5624dbc12c02df947c9fd96917fb7497ecc8dc085e03db1872d941ac3b48c0
MD5 b07fbd8604dd0f0add41ee6995337239
BLAKE2b-256 dade019fae715da5a5d2abfa103fc5685470f325d3d8ef14a0e9c1980ca645ff

See more details on using hashes here.

File details

Details for the file django_static_swagger_ui-4.14.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_static_swagger_ui-4.14.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dc22481405aa7fe86ac4594cf05f776df991d58649ef1a422e906c0788355f62
MD5 0ec4cd81ff0c93a0e88e9646fafa8abd
BLAKE2b-256 126fa4bdad0b14d46f24c487bace5d25503615c5545a724a055398237a741a1b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page