Giter Site home page Giter Site logo

drf-api-dump's Introduction

drf-api-dump

This django app is intended for dump data from apps or models via HTTP. Basically exposes dumdata command via http for custom needs. (just for superusers)

Features:

  • Just accesible by superusers
  • Ability to include or exclude any specific app or model

Requirements:

  • Django (Developed under 3.1.1)
  • Django Rest Framework (Developed under v3.11.1)

Installation

via pip from command line:

$ pip install drf-api-dump

or include into requirements file as:

Django<=3.1.1
...
drf-api-dump
...

Configuration

urls.py:

Simply add a route like this in urlpatterns

urlpatterns = [
    ...
    url(r'^your-route-to-drf-dump-api/', include('drf_api_dump.urls', 'drf-api-dump'), namespace='drf-api-dump'))
]

settings.py

Add this lines to your settings.py if you need some customizations

# If you want to limit available apps and models to dump use DRF_API_DUMP_AVAILABLE
# Sets a list or tuple with app names or app.model.
# i.e.: Suppose you want to limit access to app auth (complete) and model token from
# authtoken app:
DRF_API_DUMP_AVAILABLES = ('auth', 'authtoken.token') 

# If you want to exclude any app or model use DRF_API_DUMP_EXCLUDE setting a list or tuple
# with app names or app.model names to exclude.
# i.e.: Suppose you want to exclude auth.permission model from dumps
DRF_API_DUMP_EXCLUDES = ('auth.permission')

# If you want to serve all apps and models, simply comment or delete those lines.

# If you want to change the view title
DRF_API_VIEW_TITLE = 'My customized view title'

This package has been written and released by David Vicente Ranz on July 2017

That's all folks!

drf-api-dump's People

Contributors

davidvicenteranz avatar

Watchers

 avatar  avatar

Forkers

eldoon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.