Code Monkey home page Code Monkey logo

sugardough's Introduction

Sugardough

Sugardough is a web application template based on Django. Sugardough is build using Cookiecutter.

Features:

Requirements Status

Virtualenv Build Status Docker Build Status

Create a sugardough project

  1. Get cookiecutter:

    $ pip install cookiecutter
  2. Run cookiecutter with sugardough template

    $ cookiecutter https://github.com/mozilla/sugardough
  3. Done!

Contribute to sugardough

To contribute to sugardough development:

  1. Clone this repository

  2. Create a virtualenv.

  3. Install development requirements using pip:

    $ pip install -r requirements.txt
  4. Update the template directory, and cookiecutter.json as well with new variables if needed.

  5. Run the regeneration script that auto-creates a test site:

    $ ./bin/regenerate.py
  6. Launch the test site to see your changes:

    $ cd test_project/sugardough
    $ docker-compose up
  7. Git commit changes.

  8. Pull request!

The regenerate.py command can also watch for changes and auto-regenerate the test project:

$ ./bin/regenerate.py --watch

If you want the test project to use a different value for a variable than the default defined in cookiecutter.json, add the value to your ~/.cookiecutterrc file:

default_context:
    project_name: "Foo Bar"

Opinions

  • If you want to change the rules for PEP8, go and edit the setup.cfg file.

  • If you want to use MySQL instead of PostgreSQL (which is default), edit the generated requirements.txt file and remove the lines about psycopg2 then use peep to add the version of MySQL-python you want to use. You will also need to edit the .travis.yml file accordingly.

  • if you want to use pytest add in requirements.txt pytest, py, cov-core and pytest-django. For test coverage you'll also have to add pytest-cov. Next you'll need to edit the .travis.yml file and edit the script part. Instead of coverage run manage.py test it py.test --cov=sugardough.

  • Dockerfile uses Python 3. If you want Python 2 change the following line

    apt-get install -y --no-install-recommends build-essential python3 python3-dev python3-pip \

    to

    apt-get install -y --no-install-recommends build-essential python python-dev python-pip

    and remove the next two lines starting with RUN update-alternatives.

License

Sugardough itself is licensed under the Apache 2 license. See the LICENSE file in this repository for the full text of the license. The website projects produced using sugardough use the Mozilla Public License version 2 by default.

sugardough's People

Contributors

glogiotatidis avatar jgmize avatar peterbe avatar magopian avatar pmac avatar jezdez avatar lmorchard avatar tofumatt avatar maurodoglio avatar osmose avatar akatsoulas avatar tyler46 avatar

Watchers

James Cloos avatar Shivangi 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.