The Django Base Site is a Django site that is built using the best Django practices and comes with all the common Django packages that you need to jumpstart your next project.

Overview

Django Base Site

The Django Base Site is a Django site that is built using the best Django practices and comes with all the common Django packages that you need to jumpstart your next project.

Documentation

Documentation is available at http://django-base-site.readthedocs.org/.

Features

Install Requirements

Before setting up a new project make sure you have the following installed:

It's not a requirement, but it is recommended that you install Python using Pyenv with the virtualenvwrapper plugin.

Quickstart

Using the Install Script

Running the following script mostly does the same thing as manual quickstart method. The exception is that the install script has questions to customize your new project setup. Just run the following in your terminal to get started.

$ bash <(curl -s https://raw.githubusercontent.com/epicserve/django-base-site/master/scripts/start_new_project)

Example output:

$ cd ~/Sites
$ bash <(curl -s https://raw.githubusercontent.com/epicserve/django-base-site/master/scripts/start_new_project)

What is the project name slug [example]?
What directory do you want your project in [/Users/brento/Sites/example]?
Are going to use Docker Compose (Y/n)? Y
Are going to Heroku for deployment (Y/n)? Y

Done.

To start Docker Compose run:
$ cd /Users/brento/Sites/example
$ docker-compose up

Manual

$ curl -LOk https://github.com/epicserve/django-base-site/archive/master.zip && unzip master
$ mv django-base-site-master example
$ cd example
$ python -m venv .venv && source .venv/bin/activate
$ pip install -r ./requirements-dev.txt
$ export SECRET_KEY=$(python -c "import random; print(''.join(random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789%^&*(-_=+)') for i in range(50)))")
$ cat > .env <<EOF
DEBUG=on
SECRET_KEY='$SECRET_KEY'
EMAIL_URL='smtp://username:[email protected]:587/?ssl=True&_default_from_email=John%20Example%20%3Cjohn%40example.com%3E'
# Uncomment the following if you're using docker-compose
# DATABASE_URL=postgres://[email protected]:5432/postgres
CACHE_URL=redis://redis:6379/0
EOF
$ ./manage.py migrate
$ ./manage.py createsuperuser
$ ./manage.py runserver

Deploy on Heroku

$ git init
$ git add .
$ git commit
$ heroku create
$ heroku addons:create mailgun
$ heroku addons:create rediscloud
$ heroku buildpacks:add --index 1 heroku/nodejs
$ heroku buildpacks:add --index 2 heroku/python
$ function quote {
$     echo $(python3 -c "import urllib.parse, sys; print(urllib.parse.quote('${1}'))")
$ }
$ alias hg='heroku config:get'
$ heroku config:set READ_DOT_ENV_FILE=off \
SECRET_KEY=`python -c "import random; print(''.join(random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789%^&*(-_=+)') for i in range(50)))"` \
EMAIL_URL=smtp://$(quote $(hg MAILGUN_SMTP_LOGIN)):$(quote $(hg MAILGUN_SMTP_PASSWORD))@`hg MAILGUN_SMTP_SERVER`:`hg MAILGUN_SMTP_PORT`'/?ssl=True&_default_from_email='$(quote $(hg MAILGUN_SMTP_LOGIN)) \
ALLOWED_HOSTS='*' \
CACHE_URL=`hg REDISCLOUD_URL`
$ git push --set-upstream heroku master
$ heroku run python manage.py migrate
$ heroku run python manage.py createsuperuser    
$ heroku open

Note: Before you'll be able to send email using Mailgun you'll have to setup your Heroku app on a custom domain under Heroku and Mailgun.

Owner
Brent O'Connor
Brent O'Connor
Boilerplate for starting a python project

Python Project Boilerplate Simple boilerplate for starting a python proect. Using the repo Follow following steps to install client on server Create a

Prajwal Dahal 1 Nov 19, 2021
A Django project skeleton that is modern and cutting edge.

{% comment "This comment section will be deleted in the generated project" %} Edge A Fantastic Django project starter. Features Ready Bootstrap-themed

Arun Ravindran 827 Dec 15, 2022
A project to get you started with Docker and Django.

Docker Django tl;dr $ git clone [email protected]:erroneousboat/docker-django.git $ d

JP Bruins Slot 176 Dec 29, 2022
Um template para quem quiser usar o Docker + PGSQL + Django.

Um template para quem quiser usar o Docker + PGSQL + Django.

Drack 2 Mar 11, 2022
The starter for the Flask React project

Flask React Project This is the starter for the Flask React project. Getting started Clone this repository (only this branch) git clone https://github

Parker Bolick 2 May 14, 2022
A full stack boilerplate for FastAPI

A full stack boilerplate for FastAPI

Tyler M. Kontra 94 Dec 13, 2022
Cookiecutter-allpurpose-minimal-python - A simple cookiecutter template for general-purpose python projects.

cookiecutter-allpurpose-minimal-python A simple cookiecutter template for general-purpose python projects. To use, run pip install cookiecutter cookie

E. Tolga Ayan 2 Jan 24, 2022
A test Django application with production-level docker setup

DockerApp A test Django application with production-level docker setup. Blog: https://medium.com/@siddharth.sahu/the-near-perfect-dockerfile-for-djang

Siddharth Sahu 44 Nov 18, 2022
Starter project for python based lambda project.

Serverless Python Starter Starter project for python based lambda project. Features FastAPI - Frontend dev with Hot Reload API Gateway Integration (+r

4 Feb 22, 2022
Code Kata Python Template

Code Kata Python Template This is the code kata template for python created by Aula de Software Libre de la Universidad de Córdoba Step 1. Use this re

Sergio Gómez 2 Nov 30, 2021
A low dependency and really simple to start project template for Python Projects.

Python Project Template A low dependency and really simple to start project template for Python Projects. HOW TO USE THIS TEMPLATE DO NOT FORK this is

Yurii Dubinka 5 Jan 21, 2022
A simple cookiecutter to create Python Telegram bots, wrapped with Django.

PTB Django cookiecutter A simple cookiecutter to create Python Telegram bots, wrapped with Django. Based on this cool projects python-telegram-bot (PT

Carlos Lugones 20 Nov 12, 2022
Template for creating ds simple projects

ds-project-template Template for creating ds simple projects Requirements pyenv python==3.9.4 Setup For this purpose you use following commands: pytho

1 Dec 17, 2021
A framework for launching new Django Rest Framework projects quickly.

DRFx A framework for launching new Django Rest Framework projects quickly. Comes with a custom user model, login/logout/signup, social authentication

William Vincent 400 Dec 29, 2022
Generic python project template

generic-python-project-template generic-python-project-template STEPS - STEP 01- Create a repository by using template repository STEP 02- Clone the n

SUNNY BHAVEEN CHANDRA 3 Oct 03, 2022
This is a FastAPI, React, MongoDB stack Boilerplate. It's as glorious as a highland coo.

Coo - F.A.R.M stack BoilerPlate F.A.R.M - FastAPI, React, MongoDB This boilerplate utilizes FastAPI to build a REST API, MongoDB for data storage, and

Peter Waters 2 Feb 06, 2022
A template repository implementing HTML5 Boilerplate 8.0 in Sanic using the Domonic framework.

sanic-domonic-h5bp A template repository implementing HTML5 Boilerplate 8.0 in Sanic using the Domonic framework. If you need frontend interactivity,

PyXY 3 Dec 12, 2022
The starter repository for submissions to the GeneDisco challenge for optimized experimental design in genetic perturbation experiments

GeneDisco ICLR-22 Challenge Starter Repository The starter repository for submissions to the GeneDisco challenge for optimized experimental design in

22 Dec 06, 2022
Creating Templates and components so those can be reusable some time and makes workflow a lot easier!

TEMPLATES AND COMPONENTS IN ANY LANG! This is an Open Repository For Students to Contribute code in Hackoctoberfest in different Languages and Tech me

SriSravyaN 9 Feb 19, 2022
Django sample app with users including social auth via Django-AllAuth

demo-allauth-bootstrap Simple, out-of-the-box Django all-auth demo app A "brochure" or visitor (no login required) area A members-only (login required

Andrew E 215 Dec 20, 2022