Skip to main content

Add your description here

Project description

django-amisproxy

============ django-amisproxy 标准模板============

django-amisproxy 将django_rest_admin自动生成的drf标准api接口转换成amis后端服务接口应用,方便amis前端直接使用BI。

快速设置

  1. "amisproxy" 在 INSTALLED_APPS setting 加入 :

INSTALLED_APPS = [ ..., "amisproxy", ]

  1. 必须设置Drf分页查询,LimitOffsetPagination风格
REST_FRAMEWORK = {
    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
    'PAGE_SIZE': 30
}

API_PROXY_TARGET = 'http://localhost:8000/api/'

  1. 项目路由mysite/urls.py:
path('amis-api/', include('amisproxy.urls')),
  1. 数据迁移
manage.py migrate 
  1. 登录django管理 /admin 完成数据配置
/amis-api/ 替换 django-rest-admin的服务地址/api/进行访问

最终代理转发效果
GET /amis-api/YourModel/?page=2&perPage=50
GET /api/YourModel/?page=2&page_size=50&limit=50&offset=50

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_amisproxy-0.3.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_amisproxy-0.3.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file django_amisproxy-0.3.0.tar.gz.

File metadata

  • Download URL: django_amisproxy-0.3.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for django_amisproxy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 05198bc8f8c8d1e25546c3c2a11e796e2927d0cf335065d685412c15de3badf0
MD5 0dcd6cbdca5759065dd352f8eb6c484d
BLAKE2b-256 f0e9f857df0c1868fc53ceb20e5b751d79645d1c5aa5ea515e38db8fff406555

See more details on using hashes here.

File details

Details for the file django_amisproxy-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_amisproxy-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41449728f361db1b6e9de1c75c2bce11101200c36c0da6b5f4e28497b28cfa1d
MD5 4ec433a1596f474b7eab12c364818fdf
BLAKE2b-256 ff71cf5b011e9ccd6d637fc68c6a896a1cec48269b9b1a88d06061d488835138

See more details on using hashes here.

Supported by

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