Skip to content

EightSoft-Academy/django-coursera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django for Everybody Specialization

COURSE 1

Week 1

  • About Web sockets, Http, how the servers are working
  • Building own broswer, server, web client in Python

Week 2 - PythonAnywhere:

mkvirtualenv my_env --python=/usr/bin/python3.8
pip install django
git clone https://github.com/csev/dj4e-samples
cd dj4e-samples
pip install -r requirements.txt 

Week 3 - Html

Html Cheatsheet

Wekk 4 - CSS

CSS Cheatsheet

Week 5 - Database Handout - Command line SQLite

sqlite3 zip.sqlite3
.mode column
CREATE TABLE "Users" (
     "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE, 
     "name" TEXT,
     "email" TEXT
);
.tables
.schema Users
INSERT INTO Users (name, email) VALUES ('Kristen', 'kf@umich.edu');
SELECT * FROM Users;
DELETE FROM Users WHERE email='ted@umich.edu';
UPDATE Users SET name="Charles" WHERE email='csev@umich.edu';
SELECT * FROM Users WHERE email='csev@umich.edu';
SELECT * FROM Users ORDER BY email;
SELECT * FROM Users ORDER BY name DESC;
# If you want: DROP TABLE Users 
.quit

COURSE 2

Week 1 & 2

  • Go to slides/course_2
  • MVC (Model-View-Controller) = MTV(Model-Template-View)
  • ORM (Object Relational Mapper) 'models.py', it is easier to write the ORM then SQL code, u may have many DB
  • Views
  • Templates & Templates engine & Templates inheratance
  • Urls - URL mapping and reversing
  • Template tags and build-in filters
  • {% load foo bar from somelib%} -> csrf_token, block, url, include, extend, lorem, now, cycle, spaceless, or, and, not, in, for, if, endfor, endif
  • {{value|lorem}} -> get_static_prefix, urlize, slugify, pluralize, wordcount, upper, lower, unordered_list, truncatewords, truncatechars, title (upper the first letter), capfirst, timeuntil, timesince, time, ljust, cetner, rjust, length, length_is, last, cut, add,

Week 3

Week 4

  • Forms, GET, POST, and HTTP
  • GET for reading
  • POSt for (saving, editing, deleting)
  • CSRF Token (Cross site request forgery)
  • Tip: Use {% 'csrf' token %} with POST, + use redirect

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published