Coder Social home page Coder Social logo

sirmmo / drf-extensions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chibisov/drf-extensions

0.0 1.0 0.0 1019 KB

DRF-extensions is a collection of custom extensions for Django REST Framework

Home Page: http://chibisov.github.io/drf-extensions/docs

License: MIT License

Makefile 0.10% Python 99.90%

drf-extensions's Introduction

Django REST Framework extensions

DRF-extensions is a collection of custom extensions for Django REST Framework

Full documentation for project is available at http://chibisov.github.io/drf-extensions/docs

Build Status PyPI

Requirements

  • Tested for python 2.7 and 3.4, 3.5 versions
  • Tested for releases of Django Rest Framework from 3.1.x to 3.5.3 versions
  • Tested for Django from 1.8 to 1.10 versions

Installation:

pip install drf-extensions

Some features

  • DetailSerializerMixin
  • Caching
  • Conditional requests
  • Customizable key construction for caching and conditional requests
  • Nested routes
  • Bulk operations

Read more in documentation

Development

Running the tests:

$ pip install tox
$ tox -- tests_app

Running test for exact environment:

$ tox -e py27-drf2.3.5 -- tests_app

Recreate envs before running tests:

$ tox --recreate -- tests_app

Pass custom arguments:

$ tox -- tests_app --verbosity=3

Run with pdb support:

$ tox -- tests_app --processes=0 --nocapture

Run exact TestCase:

$ tox -- tests_app.tests.unit.mixins.tests:DetailSerializerMixinTest_serializer_detail_class

Run tests from exact module:

$ tox -- tests_app.tests.unit.mixins.tests

Build docs:

$ make build_docs

Automatically build docs by watching changes:

$ pip install watchdog
$ make watch_docs

Developing new features

Every new feature should be:

  • Documented
  • Tested
  • Implemented
  • Pushed to main repository

How to write documentation

When new feature implementation starts you should place it into development version pull. Add Development version section to Release notes and describe every new feature in it. Use #anchors to facilitate navigation.

Every feature should have title and information that it was implemented in current development version.

For example if we've just implemented Usage of the specific cache:

...

#### Usage of the specific cache

*New in DRF-extensions development version*

`@cache_response` can also take...

...

### Release notes

...

#### Development version

* Added ability to [use a specific cache](#usage-of-the-specific-cache) for `@cache_response` decorator

Publishing new releases

Increment version in rest_framework_extensions/__init__.py. For example:

__version__ = '0.2.2'  # from 0.2.1

Move to new version section all release notes in documentation.

Add date for release note section.

Replace in documentation all New in DRF-extensions development version notes to New in DRF-extensions 0.2.2.

Rebuild documentation.

Run tests.

Commit changes with message "Version 0.2.2"

Add new tag version for commit:

$ git tag 0.2.2

Push to master with tags:

$ git push origin master --tags

Don't forget to merge master to gh-pages branch and push to origin:

$ git co gh-pages
$ git merge --no-ff master
$ git push origin gh-pages

Publish to pypi:

$ python setup.py publish

drf-extensions's People

Contributors

auvipy avatar chibisov avatar pratyushmittal avatar maryokhin avatar alexander-akhmetov avatar dhui avatar jcugat avatar pdvorchik avatar santialbo avatar enikesha avatar decentral1se avatar fladi avatar ticosax avatar thedrow avatar omidraha avatar pkainz avatar tevinjoseph avatar tume avatar vshih avatar

Watchers

James Cloos avatar

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.