Skip to content

Instantly share code, notes, and snippets.

@ishannla
ishannla / 3 - Django Basics
Created December 27, 2017 00:46
Web development
CREATING NEW PROJECT
To create the project, run $ "python django-admin.py startproject <name>", where <name> is the name of the project you wish to create.
CREATING NEW APP
1. To create a new application, run $ "python manage.py startapp <appname>", where <app- name> is the name of the application you wish to create.
2. Tell your Django project about the new application by adding it to the INSTALLED_APPS tuple in your project’s settings.py file.
@ishannla
ishannla / CREATING TABLES
Created December 27, 2017 00:46
Basic extraction from data tables
CREATE TABLE SpaceMonster(`Account Balance` INT);
INSERT INTO SpaceMonster VALUES (42);
SELECT `Account Balance` FROM SpaceMonster
CREATE TABLE employee(
employee_id INTEGER PRIMARY KEY,
first_name VARCHAR(10),
dept_code VARCHAR(10),
manager_id INTEGER REFERENCES employee);
git add FILE_1 FILE_2
git commit
//need to manually add each new file
git add -A
git commit -a
git commit -m "commit message"
git commit -m "Close #2"
git push origin master