blackhaj / launcher

A Django project skeleton to provide quick setup of the basics for creating an app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Launcher

A Django project skeleton to provide quick setup of the basics for creating an app so you (and me) can get on and build the fun stuff quicker. It includes many sanitary features such as a custom user model and complete user authentication flow.

Features

  • Postgres DB with psycopg2 for production
  • Database URLs with db-django-url
  • Custom user model
  • Django-allauth integration with full authentication flow and login through email (without username)
  • Root Templates and Static Files folders
  • Pages app for static pages
  • 404, 403 and 500 error page templates
  • Email integration for sendgrid
  • Seperated environment variables
  • A alternative admin url and Django-admin-honeypot integration

How to use

  1. Make sure you have python and pipenv installed
  2. Clone the repo, install the dependencies and enter the shell
git clone https://github.com/blackhaj/launcher.git
cd launcher
pipenv install
pipenv shell
  1. Create a postgres database (https://postgresapp.com/ recommended)
psql
CREATE DATABASE db_name OWNER user_name; # semi colon vital
  1. Add the DB settings to the .env file in the database section
# Database
DB_NAME='website'
DB_USER='USERNAME'
DB_PASSWORD=''
DB_PORT=''
  1. While you are in there, add your sendgrid email details (or change the settings settings.py to use something else if you prefer e.g. console)

  2. Exit then re-enter the shell to activate the environment variables

exit
pipenv shell
  1. Create the first migrations for the custom user model in users and do the first migration.
(launcher) $ python manage.py makemigrations users
(launcher) $ python manage.py migrate
  1. Create a superuser and then fire up the server
(launcher) $ python manage.py createsuperuser
(launcher) $ python manage.py runserver

That's it. The templates are purposely basic so you can add your own styling.

Next steps

About

A Django project skeleton to provide quick setup of the basics for creating an app

License:MIT License


Languages

Language:Python 68.7%Language:HTML 31.3%