GithubHelp home page GithubHelp logo

automate-django-bash-scripting's Introduction

Bash Scripting for Django App built in Cloud9

This repo is a collection of scripts that can be used to automate processes in django

Installation

$ svn export https://github.com/bglynch/automate-django-bash-scripting/trunk/scripts

This imports a directory name 'scripts' which holds the script files

Usage

scripts/a-up-and-running.sh

  • installs django 2
  • creates project
  • adds run and PROJECTNAME to bash_alias
  • adds user to ALLOWED_HOSTS in settings.py
  • adds local database to .gitignore
$ bash scripts/a-up-and-running.sh <projectname>

Note: must adhere to django project naming conventions - ie no spaces

Test it worked
First close and then reopen the terminal

$ run

Open new tab on port 8080 and should see the following screen


scripts/b-superuser-migrate.sh

  • initial migrate
  • creates superuser
$ bash scripts/b-superuser-migrate.sh

Test it worked
Open the app and add /admin to the end of the URL
Login using the username and password create when adding superuser
Should see the following screen


scripts/c-static-files.sh

  • create static directory
  • populate directory with ./static/css/style.css
  • populate directory with ./static/js/custom.js
  • populate directory with ./static/images
  • creates templates directory
  • populate directory with ./templates/base.html
  • add path to ./templates to settings.py
$ bash scripts/c-static-files.sh

scripts/d-media.sh

  • create media directory
  • install Pillow
  • add media context processor to settings.py
  • add MEDIA_URL and MEDIA_ROOT to base of settings.py
$ bash scripts/d-media.sh

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.