Giter VIP home page Giter VIP logo

django-genie's Introduction

What's In This Starter Kit?

  • Latest Django
  • Python 3
  • Heroku deployment-ready
  • Redis and Django-RQ for asynchronous tasks
  • Sentry for exception tracking
  • Sendgrid for email sending
  • Automated testing configured
  • Login/logout/reset password/forgot password API endpoints
  • Django Suit theme for the Django Admin

What's missing?

  • Vanilla signup/login/forgot password/reset password
  • Makefile for tests and deployment
  • How to deploy to Heroku
  • Development process
  • Project structure - where to add new apps

Dev Setup

  1. Clone this repo: git clone [email protected]:simplefractal/fractal-django-genie.git;
  2. Create a new repo on GitHub, change the local git origin to point to the new repo and the push.
  3. Inside this new repo, erase this README so it will lose this current text;
  4. Create a virtualenv for Python 3.5: mkvirtualenv {{ VIRTUAL_ENV_NAME }} -p /usr/bin/python3.5;
  5. Copy default postactivate: cp contrib/proj_postactivate $VIRTUAL_ENV/bin/postactivate;
  6. Edit $VIRTUAL_ENV/bin/postactivate for you custom env config (e.g. update DATABASE_URL) and re-run the workon command;
  7. Install the packages: pip install -r dev-requirements.txt;
  8. Create postgres db: createdb {{ DATABASE_NAME }};
  9. Install redis (click here if you're using Ubuntu)
  10. Migrations: python manage.py migrate
  11. Create admin user: python manage.py createsuperuser
  12. Runserver: python manage.py runserver

Asynchronous Tasks

Run django-rq for email sending: python manage.py rqworker high low default

How to run the tests

From inside the project directory, run pytest.

Alternative env setup

You can also create a .env file inside of config similar to .env-example

Git Workflow

  1. Create feature branch off of dev with the feature prefix such as feature/sso-login
  2. Develop and commit in this branch
  3. Make sure tests are passing with pytest command from the project directory
  4. When finished, open a pull request
  5. When reviewed and updated, merge into dev with the following commands or just use the Github merge button and remember deleting the remote branch:
$ git checkout dev
$ git merge --no-ff feature/sso-login
$ git push origin dev
$ git push origin :feature/sso-login  # deletes remote branch

django-genie's People

Contributors

berinhard avatar henrysxie avatar lucianoratamero avatar mazulo avatar romulocollopy avatar suneel0101 avatar

Watchers

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