Code Monkey home page Code Monkey logo

generator-django-rest's Introduction

generator-django-rest npm Build Status GitHub license

A Yeoman generator for a Django REST API that makes you efficient, includes features you need in a typical modern web app, yet keeps things simple.

Note: the project is still considered to be in alpha until I get a chance to test it on more apps!

Features

The philosophy is to include features useful across projects that are tedious to set up from scratch. So far we've got

  • quick to launch πŸš€ – start a new project and deploy it to Heroku in 3 commands:

      yo django-rest
      ./scripts/devsetup.sh
      ./scripts/deploy.sh
    
  • productive ⚑️ – start the Django & DB dev servers easily

      ./scripts/dev.sh
    
  • sane logging πŸ“œ – defaults to fail nicely

  • modern JS πŸ¦„ – serve static files on / using Whitenoise for nice single-page apps using React / Angular2 / Vue and the like

  • 12-factor config πŸ€“ – environment variable configuration

    • define a variable in .env for dev e.g. REDIS_URL=redis://localhost:6379/0
    • use it in settings.py, e.g. CELERY_RESULT_BACKEND = env('REDIS_URL')
    • set variables on the prod server (just worksβ„’ with Redis on Heroku)
  • batteries included πŸ”‹

    • Celery with a Redis backend – cause you'll need an async task queue
    • Backblaze B2 media file storage backend (optional)
  • familiar 🐢 – check out the rough project file layout, it's much like django-admin startproject myproject would set it up (only repeats the project name twice, i.e. ~/code/myproject/myproject/settigns.py)

Getting Started

To begin, your computer first needs node.js. Once you have that, you need Yeoman pre-installed. Yeoman lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive.

npm install -g yo

Then, we need the django-rest generator, i.e. plug-in. You install generator-django-rest from npm.

npm install -g generator-django-rest

Finally, for every new project you would initiate the generator in an empty folder.

mkdir myproject
cd myproject
yo django-rest

Now check HACKING.md for extra instructions.

License

MIT

generator-django-rest's People

Contributors

metakermit 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.