GithubHelp home page GithubHelp logo

sudhir512kj / django-project-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thorgate/django-project-template

0.0 1.0 0.0 1.07 MB

Thorgate's Django project template - Django, React, Sass, optional Docker and more

License: ISC License

Python 50.47% Makefile 4.09% Shell 2.34% JavaScript 8.63% CSS 28.03% HTML 6.44%

django-project-template's Introduction

Thorgate's Django template (Bootstrap 4 variant)

Build status

Django project template that we use at Thorgate.

Best suited for medium-sized and bigger apps that use JavaScript and React for frontend.

See also the Single-Page Application and Bootstrap 3 variants.

(note that the primary repo is in Gitlab, with mirror in Github)

Features

  • Django-based backend

    • Django 1.11 (because it's LTS)
    • Separate settings for different environments (local/staging/production)
    • Python 3.4 / 3.5 / 3.6
  • Frontend app with JavaScript (ES2015), React and Sass

    • Latest JavaScript features from ES2015 and beyond, transpiled with Babel
    • React 16 for fast modular user interfaces
    • Sass, PostCSS and Autoprefixer for more convenient styling
    • Webpack 2.3 is used to bundle and minify JavaScript and styles
  • Batteries

    • Docker / Docker Compose integration
    • Linting of Python, JavaScript and Sass code with Prospector, ESLint and stylelint
    • py.test and coverage integration
    • Deploy helpers, using Fabric
    • Media files are stored in a CDN like S3 or Google Cloud Storage
    • Out-of-the-box configuration for nginx, gunicorn and logrotate
    • Includes PyCharm project config

Usage

To use this template, first ensure that you have Pipenv 2018.11.26 available.

After that, you should:

  1. Install the requirements of the project template by running

    pipenv install
    
  2. Activate the virtualenv created by pipenv:

    pipenv shell
    
  3. Navigate to the directory where you'd like to create your project:

    cd /home/my-awesome-projects/
    
  4. Create a new project by executing:

    cookiecutter dir/to/django-project-template/
    

It will ask you a few questions, e.g. project's name.

After generation completes, you should deactivate virtual environment for cookiecutter, search for any TODOs in the code and make appropriate changes where needed.

See README.md in the generated project for instructions on how to set up your development environment.

Upgrading project template

First ensure you have a python3 interpreter with cookiecutter installed.

To upgrade an existing project, change the current working directory to the root of the project you want to upgrade. i.e. cd project-to-upgrade. Ensure your are not in the template branch.

Then run python ~/path/to/django-project-template/upgrade-template.py

This will make a commit to the branch template in your project with the updates to the project template. Then merge the template branch.

django-project-template's People

Contributors

joosepalviste avatar jorgenader avatar jyrno42 avatar odifyltsaeb avatar rivol avatar roccogalluzzo avatar rrebase avatar schryer avatar simonschmidt avatar taaviteska avatar vegetablejuiceftw avatar ykshatroff avatar

Watchers

 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.