Difference between revisions of "Python Django"
PoojaMoolya (Talk | contribs) |
Nancyvarkey (Talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | Django is a free and open-source web framework, written in Python. It is an amazing framework for web developers because it provides the infrastructure required for database-driven websites that have user authentication, content administration, contact forms, file uploads, and more. Django stands way out in front for ease of use and ability to allow a programmer to produce robust, secure, and bug free code quickly, very easy to switch database. Django offers a big collection of modules which you can use in your own projects. It is based on MVT (Model View Template) design pattern. The Model helps to handle database. The Template is a presentation layer which handles user interface part completely. The View is used to execute the business logic and interact with a model to carry data and renders a template. Django is designed in such a manner that it handles much of configure things automatically, so we can focus on application development only. It prefers conventions over configurations which means that it gives you a way of implementing some task and you have to stick to this method to implement it. You have less flexibility in that case but at the same time more secure and efficient because these conventions have been developed by thousands of active developers out there in the world. | + | '''Django''' is a free and open-source ''web framework'', written in '''Python'''. It is an amazing framework for web developers because it provides the infrastructure required for database-driven websites that have user authentication, content administration, contact forms, file uploads, and more. Django stands way out in front for ease of use and ability to allow a programmer to produce robust, secure, and bug free code quickly, very easy to switch database. |
+ | |||
+ | '''Django''' offers a big collection of modules which you can use in your own projects. It is based on '''MVT (Model View Template)''' design pattern. The '''Model''' helps to handle database. The '''Template''' is a presentation layer which handles user interface part completely. The '''View''' is used to execute the business logic and interact with a model to carry data and renders a template. | ||
+ | |||
+ | '''Django''' is designed in such a manner that it handles much of configure things automatically, so we can focus on application development only. It prefers conventions over configurations which means that it gives you a way of implementing some task and you have to stick to this method to implement it. You have less flexibility in that case but at the same time more secure and efficient because these conventions have been developed by thousands of active developers out there in the world. | ||
+ | |||
+ | The Spoken Tutorial effort for '''Django''' has been contributed by '''Thiagarajar College of Engineering''' team led by '''Dr. Suntharakantham'''. The videos were recorded by '''Praveen Somu''' from Spoken Tutorial team. '''Prathamesh Salunke''' from FOSSEE team and '''Nancy Varkey''' from Spoken Tutorial team supported this effort. | ||
+ | |||
+ | The domain review is done by '''Prathamesh Salunke''' from FOSSEE team. | ||
+ | |||
+ | '''Learners:''' Web developers | ||
+ | |||
+ | __TOC__ | ||
+ | === Basic Level === | ||
+ | |||
#Getting started with Django | #Getting started with Django |
Latest revision as of 12:04, 2 December 2022
Django is a free and open-source web framework, written in Python. It is an amazing framework for web developers because it provides the infrastructure required for database-driven websites that have user authentication, content administration, contact forms, file uploads, and more. Django stands way out in front for ease of use and ability to allow a programmer to produce robust, secure, and bug free code quickly, very easy to switch database.
Django offers a big collection of modules which you can use in your own projects. It is based on MVT (Model View Template) design pattern. The Model helps to handle database. The Template is a presentation layer which handles user interface part completely. The View is used to execute the business logic and interact with a model to carry data and renders a template.
Django is designed in such a manner that it handles much of configure things automatically, so we can focus on application development only. It prefers conventions over configurations which means that it gives you a way of implementing some task and you have to stick to this method to implement it. You have less flexibility in that case but at the same time more secure and efficient because these conventions have been developed by thousands of active developers out there in the world.
The Spoken Tutorial effort for Django has been contributed by Thiagarajar College of Engineering team led by Dr. Suntharakantham. The videos were recorded by Praveen Somu from Spoken Tutorial team. Prathamesh Salunke from FOSSEE team and Nancy Varkey from Spoken Tutorial team supported this effort.
The domain review is done by Prathamesh Salunke from FOSSEE team.
Learners: Web developers
Contents
Basic Level
- Getting started with Django
- Python Virtual Environment
- Create a Virtual Environment
- Activate the Virtual Environment
- pip command
- Install Django
- Update Django version
- Create a Django project
- The Django project file structure
- Start the Django development server
- Accessing Django web page
- Stop the Django development server
- Deactivate Virtual Environment
- Delete the Virtual Environment
- Creating Django Models
- About Django App
- Djano Model
- Create a blog app
- Blog app directory structure
- Initialize a Django app
- Create a Django Model and
- Perform Database migration
- Settings.py file
- manage.py
- migrate command
- makemigrations command
- 001_initial.py file
- How to Use Django Admin App
- Use Django admin app
- Create an admin user
- Django Admin interface
- Login to Django Admin interface
- Authentication and Authorization
- Registering Blog App
- Registering Blog Models
- Add Blog
- Add Articles
- Logout from Django Admin interface
- Add, Modify and Delete data using the admin app
- Web Application and Web Framework
- Creating Views and Design URLs
- What is a view?
- Create a Django view
- Http Request object
- HttpResponse class
- django.urls modules
- Create a URL routing scheme
- path function
- Client Server model
- string formatting operation
- placeholder
- Creating HTML Template in Django
- Create templates folder
- Create a Django template
- Use Django HTML template
- Django templates system
- Template tags
- Template variables
- Template filters
- title filter
- render function
- django.shortcuts module
- Django Shell and Django Database Query
- About Django Shell
- Access Django shell
- Create a Django Query
- Create Blog Instance via shell
- Assign value to the blog instance
- Timezone module
- Access blog object
- Change blog name
- Display blog objects
- Check blog creation date
- Filter with Django Queries
- Creating Forms in Django
- HTML Forms
- Create a Django form
- Django inbuilt libraries
- Create views to handle form submission
- CSRF - Cross Site Request Forgery Protection
- GET and POST Request
- Form validation
- Add Blog via form input method
- Display the blog list
- Edit existing blog
- Using CSS and JavaScript in Django
- About CSS
- About JavaScript
- Django Static files
- Load static files
- Django Static template tag
- Create CSS and JavaScript files for Django
- Add style to the list items
- Set color to the text
- Add an alert message when the page loads
- Link CSS and JS to Django template
- Django Authentication
- Django Authentication and Authorization system
- Verify user credentials
- Define user actions
- Create a login functionality
- Create a logout functionality
- Use Django’s built-in login and logout functions
- Login page redirection
- Logout page redirection
- Accessing the page as registered users
- Restrict access to the pages
- Testing in Django
- Django Automated testing
- Unit test model
- Write tests in Django
- TestCase class
- Run the tests in Django
- Run specific tests
- Assertion methods
- Test Database
- SetUp method
- TearDown method