Intro to Django

markkimjr·2021년 1월 21일

What is a web framework?

As the word "framework" indicates, a web framework is sort of like a loose skeleton that has already been built for us. As long as we follow the rules of the framework, we can use it to build our own website, or in the case of the skeleton, a human body 😱. To provide a more technical definition, a web framework is a collection of packages or modules (code library) that makes web development MUCH easier by providing a common framework for us to build around. So long as we follow the rules of the framework, we are in good shape!

MVC (Model View Controller)

Basic pattern that is used to make web programs

Model ( store data safely, query data (everything is saved on database server)
View ( the basic logic of the program. Use determine how to show data to user in proper and optimal way (how data and interface are presented)
Controller/Template ( Update and coordinate Model and View according to user inputs and events (html files)

Django acts as the Controller (template) and is thus a web framework that we can use to build programs!

Django - Basic Concepts

** **is used to run and control different features of the program, and is used to control the settings and options of the project. import terms:

  • startapp (create app)
  • runserver (run server)
  • createsuperuser (create admin)
  • makemigrations app
  • migrate: reflect changes on database
python sqlmigrate account 0001
  • shell
  • collectstatic


#mambamentality 🐍

0개의 댓글