nprapps/django-starter-kit

Name: django-starter-kit

Owner: NPR visuals team

Description: Opinionated template for Django projects on Python 3 and PostgreSQL

Created: 2017-04-12 19:09:34.0

Updated: 2017-08-08 22:33:55.0

Pushed: 2017-09-08 18:40:53.0

Homepage:

Size: 33

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

nprviz's Django Starter Kit

About this template

This is a barebones starter kit for making lightweight Django applications. It includes some basic configuration for the Django project and app, configuration for uWSGI and nginx, and Fabric commands for bootstrapping and deployment to servers.

This codebase is licensed under the MIT open source license. See the LICENSE file for the complete license.

Please note: logos, fonts and other media referenced via url from this template are not covered by this license. Do not republish NPR media assets without written permission. Open source libraries in this repository are redistributed for convenience and are each governed by their own license.

Also note: Though open source, This project is not intended to be a generic solution. We strongly encourage those who love the app-template to use it as a basis for their own project template. We have no plans to remove NPR-specific code from this project.

Assumptions

The following things are assumed to be true in this documentation.

For more details on the technology stack used with the app-template, see our development environment blog post.

Copy the template

Create a new repository on Github. Everywhere you see $NEW_PROJECT_NAME in the following script, replace it with the name of the repository you just created.

clone git@github.com:nprapps/django-starter-kit.git $NEW_PROJECT_NAME
NEW_PROJECT_NAME

rtualenv -p `which python3` $NEW_PROJECT_NAME
install -r requirements.txt

bootstrap

This will setup the new repo and will replace README.md (this file) with PROJECT_README.md. See that file for usage documentation.

By default bootstrap will use nprapps as the Github username, and the current directory name as the repository name. This is a best practice, but you can override these defaults if you need to:

bootstrap:$GITHUB_USERNAME,$REPOSITORY_NAME

The end of the fab bootstrap printout will give you a secret key. You must put this in your environment before you try to setup the Django app. (If you're at NPR, store this in our shared env file.)

Then, setup the Django app.

django.setup_django

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.