Skip to main content

Package to display all URLs of a Django application

Project description

Django Endpoints

Django Endpoints is a small Django application that displays your project's URLs, grouping them by applications.

Sometimes I use this in different projects, so I decided to put it on pypi

Installation

pip install django-endpoints

Settings

  • Add the application to the project.

    INSTALLED_APPS = [
        #...
        'endpoints',
    ]
    
  • In settings.py set the params

    # required * URL to which unauthenticated or non-staff users will be redirected (is_staff=False).
    EP_NOT_AUTH_REDIRECT_URL = '/admin/login/?next=/endpoints/'
    
    # A tuple of application names that you want to exclude from the list of URLs to display.
    EP_EXCLUDED_APPS = (
        'logui',
        'swagger',
        'rest_framework',
    )
    
    # Section with custom links
    EP_CUSTOM_LINKS = [
        {'name': 'Logs', 'url': 'https://xxx.xxx/logs/'},
        {'name': 'Nginx', 'url': 'http://42.33.125.119:81/'},
        {'name': 'Swagger', 'url': 'https://xxx.xxx/swagger/'},
        {'name': 'Minio', 'url': 'https://minio.xxx.xxx/'},
        {'name': 'Pg Admin', 'url': 'https://pgadmin.xxx.xxx/'},
        {'name': 'Flower', 'url': 'https://flower.xxx.xxx/'},
    ]
    
  • Add routes

    Only is_staff have access.

    from django.urls import path, include
    
    urlpatterns = [
        #...
        path('endpoints/', include('endpoints.urls')),
    ]
    
  • Open https://localhost:8000/endpoints/

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_endpoints-0.0.3.tar.gz (42.8 kB view details)

Uploaded Source

Built Distribution

django_endpoints-0.0.3-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file django_endpoints-0.0.3.tar.gz.

File metadata

  • Download URL: django_endpoints-0.0.3.tar.gz
  • Upload date:
  • Size: 42.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.6

File hashes

Hashes for django_endpoints-0.0.3.tar.gz
Algorithm Hash digest
SHA256 19b67e2e66a1ed83d1a223fe1b9fae13f9c0ad6dde7bcdefc15e244d44e568d2
MD5 0356c5fdac12c295db10045ce517d6fb
BLAKE2b-256 1a741593fcfc7cb4825b384af6f7988e0015ded9ae4e5e51742b88a74f37b36b

See more details on using hashes here.

File details

Details for the file django_endpoints-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_endpoints-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d4181f065e0ac43cf96a933cd3d55833440fcb7d766da3b22d13f935aa2b4429
MD5 b3ffb0239c4fc9f27e8e26c557a6894a
BLAKE2b-256 edea122ae9fe076c512dd190975243cec551cb388c2e8f37a6e8d5cd7d2a8399

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