Code Monkey home page Code Monkey logo

django-starter's Introduction

Django-starter

Django starter, baby!

This project provides a useful starter dough that you can use to bake a delicious Django cake! It's extremely opinionated, just like Django, and is mostly just something I'll use for my own projects -- Although, you're welcome to use it if you want!

What's included?

  • A basic Pipfile with some useful packages and scripts.
  • A docker-compose file that allows hot-seat reloading and includes a PostgreSQL database that will automatically hook up to your Django app.
  • gunicorn for launching your webapp with several workers and threads. Makes it more scalable, basically.
  • whitenoise which is super convenient for serving static files straight out of your webapp. Greatly simplifies things.
  • A .gitignore with some common ignores in it.
  • One Django app with nothing in it.

Okay, now how do I do this?

Make sure docker and docker-compose are installed, then just run docker-compose up in the root folder. This will launch your app, and the files will all be hot-reloadable, so you can just write code and refresh the browser.

This will set up a database too, but the database will not persist any data.

Docker is scary, do I have to use it?

Well, no. Here's how you would use it without Docker.

First, you'll need PostgreSQL running somewhere. You'll also need to make sure pipenv is installed. Then create a new file called .env in the root folder, and fill it with something like this:

DEBUG=1
SECRET_KEY=yellowpolkadotbikini
POSTGRES_USER=lemon
POSTGRES_PASSWORD=coolpassworddude
POSTGRES_HOST=localhost
POSTGRES_PORT=5432

Now to start your app, just run pipenv install to set everything up, and then pipenv run start to run the app.

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.