Description
Django is an MVC (Model-View-Controller) web framework based on the Python language. This course will teach you how to implement this framework and use its different modules effectively in the development of web applications.
Who is this training for ?
For whom ?The training is intended for developers wishing to acquire in-depth knowledge of the basics of the Django framework.
Prerequisites
Training objectives
Training program
- Introduction
- Reminder of the principles of OOP.
- The MVC Design Pattern.
- Presentation of the Django framework.
- Origin and history.
- Objectives and benefits.
- Django framework components.
- Exercise: Preparing the environment.
- Installing Python , Django, Apache Server, MySQL and Eclipse.
- Creating a new project.
- Accessing data with Django
- The Django ORM model.
- The Django models: Model, Field, Table, Column, Primary Key.
- Mapping associations: OneToMany, ManyToOne, ManyToMany, OneToOne.
- Inheritance mapping strategies: Meta Class, OneToOneField, ManyToManyField.
- Data access with QuerySets.
- Exercise: r nDevelop a data access layer.
- Interfacing Django with MySQL.
- View management
- Simple views or view functions.
- The HttpResponse, HttpRequest and QueryDict classes.
- URL configuration: UrlConf.
- Generic views.
- Generic view examples: Redirects, Create, Update, Delete.
- Exercise: Develop dynamic HTML views with Django.
- Les templates
- The role of templates.
- Creating and loading templates.
- Context management.
- Using custom tags and filters.
- Reusing templates: inheritance between templates.
- Exercise: Develop a template to facilitate presentation generation.
- Forms management
- The advantages of Django forms.
- Creating forms.
- The different types of fields.
- Validating data from a form .
- Management and personalization of error messages.
- Generation of forms from models.
- Exercise: Develop the forms associated with operations CRUD from the previous workshop.
- Advanced functions
- Internationalization.
- Authentication and session management.
- Optimization and caches.
- Ajax integration.
- The administration interface.
- Unit tests.
- Exercise: Integrate Ajax through the JQuery framework.