Skip to content
The Django Base Site is a skeleton base site that can be used to jumpstart any new Django site.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
apps
config
docs
src
.coveragerc
.editorconfig
.gitignore
Dockerfile
Dockerfile.node
LICENSE.md
Makefile
Pipfile
Pipfile.lock
Procfile
README.md
Vagrantfile
docker-compose.yml
fabfile.py
gulpfile.js
manage.py
package-lock.json
package.json
setup.cfg
start_new_site.sh

README.md

Django Base Site

The Django Base Site is a skeleton base site that can be used to jumpstart any new Django site. Brent O'Connor created it so he could use it personally to jumpstart any of his new Django projects. Please feel free to fork this project and adapt it to your own personal taste.

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.

One-liner Quickstart

Running the following script does the same thing as quickstart guide.

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

Quickstart

$ curl -LOk https://github.com/epicserve/django-base-site/archive/master.zip && unzip master
$ mv django-base-site-master example
$ cd example
$ pipenv install --dev --python $(which python3)
$ 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_HOST='smtp.planetspaceball.com'
EMAIL_HOST_USER='skroob@planetspaceball.com'
EMAIL_HOST_PASSWORD='12345'
DEFAULT_FROM_EMAIL="President Skroob <skroob@planetspaceball.com>"
EOF
$ pipenv shell
$ ./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 config
$ heroku config:set READ_DOT_ENV_FILE=off \
WSGI_APPLICATION=config.heroku_wsgi.application \
SECRET_KEY='random string of 50 chars' \
DEFAULT_FROM_EMAIL='$MAILGUN_SMTP_LOGIN' \
EMAIL_HOST='$MAILGUN_SMTP_SERVER' \
EMAIL_HOST_USER='$MAILGUN_SMTP_LOGIN' \
EMAIL_HOST_PASSWORD='$MAILGUN_SMTP_PASSWORD' \
ALLOWED_HOSTS='*'
$ 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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.