
Explore Django fundamentals, build a blog application and a question and answer app, and dive into the Django test framework in this course introduction.
Acquire basic python knowledge to begin this course; we will cover django and django's test framework fundamentals. Install python from python.org, using python 3.9 here and 3.10 as the latest.
Identify essential software requirements for the course, including choosing the community edition of the item ID, installing Visual Studio Code, SQLite database tools, and Postman for API testing.
Learn to build a blog application with Django, Django REST Framework, and React frontend using Jangle, implementing article create, edit, delete, authentication (login and registration), pagination, and deployment to Haruko.
Learn how Django, a Python web framework, installs via pip and creates your project. Use manage.py, runserver, and migrations with SQLite3 by default, and explore DRF integration with frontend frameworks.
Set up Django, run migrations, create a super user via manage.py, and log into the Django administration site to manage auth_user.
Create and configure Django apps to organize project functionality, using manage.py startapp, structuring migrations, models, and views, and registering apps in settings for admin access.
Learn how to implement a function-based view in Django that takes a web request and returns a web response, and map it to URLs using path and include.
Define entities as Django models using Python classes that map to database tables with fields like title and description, including a slack field and an author foreign key with migrations.
Explore Django model relationships, including many-to-one, one-to-one, and many-to-many, with practical examples linking category to article, place to restaurant, and article to publication.
Register the article model in the Django admin panel using admin.site.register, then customize with a ModelAdmin showing title, published, and author, plus date hierarchy and search fields.
Learn how Django templates render views with the render function, passing request, template name, and optional context to produce HTML, and compare app level versus project level templates.
Explore Django's template inheritance by creating a base template with blocks and extends, then override blocks in child templates to reuse layout and keep articles consistent.
Learn to add css and bootstrap styles to a Django project by using a static folder or app-level styles, and apply bootstrap classes to headings and layout.
Learn to create dynamic slugs for articles in Django by using the post_save signal and a signal receiver to auto generate and save slugs based on the article title.
Retrieve articles from the database in a Django view and render them with a for loop in a template, displaying title, description, and author on the homepage.
Add a Bootstrap navbar to the Django blog app by embedding a Bootstrap component into the base template and configuring home, about, login, register, profile, and logout links.
Create a Django article detail page using get_object_or_404 to fetch an article and render its title (as a link), published date, author, and description in a detail template.
Build a Django login system by creating a login form and authenticating users. Secure the flow with CSRF protection and render the login template.
Create a Django registration system using crispy forms and bootstrap, with a password-confirmation flow, validation, and a view to register users and enable login.
Learn to implement Django built-in login with a class-based view, create login templates in a registration directory, use crispy forms, and set login redirect to the article list.
Build and test a Django logout flow by creating a logout view and template, wiring it to the URL, updating settings, and validating login and logout actions.
Learn to restrict the navbar in Django by conditionally displaying login and register to guests and profile and logout to authenticated users, using request.user.is_authenticated.
Implement a Django password change flow using the built-in user system, with class-based views, URLs, and templates for change and done, plus crispy forms validation.
Build on the login and registration system to add articles with an article registration form, validate and save articles linked to the user, and redirect to the article list.
Learners add delete and update buttons to article details in a django project and show these buttons only to the authenticated author of each article.
Implement an article update in Django: use a model form, fetch the article with get_object, validate and save changes, then redirect to the article list.
Build delete article capability in a Django project by wiring views, retrieving the target article, deleting it, and redirecting back to the article list for different users.
Learn to implement pagination in Django, including setting per-page article counts, handling invalid or empty pages, and building template-based navigation with next and previous links.
Apply the login required decorator to Django view functions to restrict access to articles, redirect unauthenticated users to the login page, and secure actions like add or update.
Learn to deploy a Django project to Heroku by configuring static assets with white noise, adding middleware, preparing requirements, and pushing to a Heroku app with proper production settings.
Learn how to migrate a Django project to PostgreSQL by configuring psycopg2, updating db settings, running migrations, creating a superuser, and managing content in admin.
Learn to enable social authentication in Django with social-auth-app-django for Facebook, GitHub, and LinkedIn, including settings, templates, and migrations.
Build a chat bot for Django with Django REST Framework and a React frontend, integrating a chat widget into a blog app and demonstrating basic chat interactions.
Explore how chatbots simulate human conversation with Dialogflow, a natural language understanding platform, including standard and advanced agent types for small or complex apps.
Explore how a Dialogflow agent uses intents, training phrases, and responses to guide conversations, including default welcome and fallback intents, with examples like What is Django and React.
Learn how to create a follow-up intent with training phrases and responses, configure yes and follow-up paths, and handle programming book booking and cancellation flows.
Explore Dialogflow entities, including system and custom entities, and learn to map training phrases to parameters like date time and geo city for dynamic responses.
Learn to create custom entities in Dialogflow, such as book values like Django, Python, and JavaScript, and connect them to intents for training and dynamic bot responses.
Learn to integrate Dialogflow with Kommunicate for a Django rest framework and React frontend, including creating a Google Cloud service account and uploading the key to Kommunicate.
Learn to integrate a chat bot into the Django app with a widget, onboarding customization, and static assets, deploy it, and test chat bot responses about Django and Python books.
Update a Django blog app from 3.2.7 to Django 4, upgrade packages with updated requirements, and verify local and Oracle deployment while preserving features like authentication, pagination, and Postgres backend.
Deploys a Django 4.0 blog to Heroku, updating dependencies, logs in to Heroku, pushes to git, and builds with Python 3.9, while verifying features like registration, posting, editing, and pagination.
Explore a deployed question-and-answer app built with Django and DRF, featuring user registration, login, posting and answering questions, per-user edit/delete, profiles, and search.
Create a Django project and a users app, implement a custom user model extending AbstractUser, run migrations, create a superuser, and register the custom user in the admin.
Define a Django question model with title, body, created_at, and slug, and an answer model linked to the question and custom user model; register in admin and migrate.
Create dynamic slugs for questions by implementing a Django signal receiver tied to the question model, register the signal, and test slug creation in the Django shell.
Learn to list all questions in a Django app by building a question list view, wiring URLs, rendering a base template with Bootstrap, and displaying question details and author.
Add a Bootstrap navbar to a Django project, copy and integrate the navbar code, customize items like home, ask question, profile, and login, and style with custom fonts and colors.
Explore retrieving a single question's details in a django app by using get_object_or_404 with a slug, rendering a details template that shows title, body, and posted by.
Learn to implement login and logout in a Django project using built-in auth views, configure templates, wiring URLs, and enhance forms with django crispy forms and bootstrap, including redirect settings.
Build a Django user registration flow with a custom user model and a model form. Validate passwords, set password, save user, and render a registration page.
Learn how to restrict the navbar for unauthenticated users by using request.user and is_authenticated to display login, register, home, questions, log out, and profile menu options according to authentication status.
Learn to create questions in a django app by building a title and body form, saving with author, and redirecting to the question list.
Learn to list and display answers for questions in a Django REST Framework app with a React frontend. Filter answers by question and show author and time.
Create new answers for a question using a form, validate the input, save the answer, and redirect to the question details page to reflect the update.
Learn to add delete and update buttons to questions in a Django REST Framework and React frontend, with author-based access control that shows actions only to the question's author.
Update a question in a Django app using a model form with title and body fields, handling the update in a view and rendering a crispy forms update template.
Learn to implement a delete question feature in Django by creating a view, fetching the target question with get object 404, deleting it, and redirecting to the question list.
Implement update and delete buttons for answers in a Django DRF with React frontend, showing buttons only to the answer's author and hiding them for others to enforce ownership.
This lecture demonstrates updating an answer using a Django model form, validating inputs, and redirecting to the answer details page, with a dedicated update view and template.
Create a Django view function to delete an answer using the request id, perform the delete, and redirect to the list view showing remaining answers.
Implement a Django password change flow by creating two templates (password change, password change done), validating a form with old and new passwords, and confirming the change via email.
Edit account information in a Django app by using a profile form for the built-in user model (first name, last name, username, email), processing post requests and showing flash messages.
List and filter user-specific questions and answers using Django views and templates with Bootstrap tabs. Render a combined question and answer list for each user.
Learn how to enforce authentication in Django by applying the login_required decorator to views, redirecting unauthenticated users to the login page, and protecting questions and profiles.
Improve search functionality by reading request.GET, using a Q object to filter the question list by titles containing the query, and ordering results by created date in a case-insensitive way.
Learn to deploy a Django app on Python Anywhere by configuring settings, static files, collect static, installing requirements, pushing to Git, cloning, and launching the web app.
Update a question-and-answer app from Django 3.2.7 to Django 4.0, updating dependencies in requirements.txt. Later, deploy the updated project to Python Anywhere.
Deploy a Django 4.0 project to PythonAnywhere by updating to Django 4, pushing to GitHub, cloning on PythonAnywhere, creating a virtual environment, installing requirements, and configuring settings.
Explore Django rest framework fundamentals by building function-based and class-based API views, viewsets, routers, and authentication. Deploy to heroku and migrate from sqlite to postgres while managing articles and users.
Learn how to build a Django rest framework backend API, understand restful APIs, and set up a Django project from installation to running migrations and server.
Create a Django app, define an article model with title, description, slug, and published fields, and run makemigrations and migrate, then register the model with the admin panel.
Create dynamic slugs by using Django signals to automatically generate a slug from the article title, leveraging a signal receiver, sender, and app integration.
Learn to serialize Django models into JSON with Django REST framework, declare serializers, map model fields, and apply validation to create, update, and render API responses.
Create a model serializer from the article model, mapping fields like title and description, or all fields, with automatic field generation, validators, and create/update behavior.
Create a Django API view to list and create articles using serializers, then implement detail, update, and delete operations, apply csrf exemption for testing, and wire urls.
Explore API view decorators for function-based and class-based Django views, enabling request handling, content negotiation, browsable API, and proper status responses.
Explore class-based API views in Django REST Framework, building article list and detail endpoints with get, post, put, and delete methods, using serializers and slugs with proper status codes.
Learn how mixins in Django REST framework simplify building class-based views by composing reusable behaviors for listing, creating, retrieving, updating, and deleting articles, with generics.
Explore Django REST framework generic class based views to trim boilerplate by implementing a list-create API view for articles and a retrieve-update-destroy view with proper queryset, serializer, and routing.
Explore Django REST framework viewsets and routers to auto generate endpoints, mapping article CRUD operations via a router, with serializers and URL configuration.
Learn how generic viewsets use mixins to provide list, create, retrieve, and destroy actions by default, and how to override or combine mixins to implement custom behavior.
Learn how a model viewset enables create, retrieve, update, partial update, and destroy actions for articles by configuring the article model, its serializer, and fields, including the slug.
Explore how to implement authentication in the Django REST framework by adding token and session authentication, enforcing is_authenticated permissions, and securing article editing with user credentials and token-based access.
Install and configure django rest framework and django rest auth, enable token authentication, run migrations, register users, and log in to access articles via the API.
Learn how to override the perform_create method in Django REST framework to assign the author automatically when posting new articles, ensuring correct ownership across users.
Learn how to implement custom permissions in django rest framework to restrict update and delete actions to article authors. The lecture demonstrates overriding has_object_permission to check request.user.
Deploy a Django REST framework app to Heroku by configuring whitenoise for static files, using gunicorn with a Procfile, and following Git and GitHub deployment steps for production.
Migrate a Django app from SQLite to Postgres by updating settings and installing the required library, then run migrations and create a superuser. Push changes and verify data after deployment.
Update the Django REST Framework project to Django 4.0, upgrade DRF compatibility, switch to DG Restart, migrate Postgres, and validate registration, login, and article APIs with a React frontend.
Update your django rest framework project to django 4 and drf 3.13.1, then deploy from GitHub to Heroku with automatic deployment, adjusting settings and cors origins.
Explore a Django and Django REST Framework workflow by logging in, creating and answering questions, and managing questions with update and delete permissions for authors.
Create a Django project and install Django REST framework with token authentication. Configure installed apps and settings, run migrations, create a superuser, and start the server to obtain a token.
Create a django q&a app by modeling a question with title, body, slug, and user, and an answer linked to the question; migrate, register admin, and use signals for slug.
Learn to implement django signals and receivers to automate question creation, importing user and question models, creating a question with a title and body, and verify in admin.
Create serializers for question and answer models and implement viewsets to expose full CRUD endpoints via a router, enabling list, retrieve, update, and delete operations.
Register new users with token authentication using Django REST Framework, create users, generate tokens, and enable posting questions and answers for a multi-user setup.
Configure token and session authentication in Django REST framework and enforce authenticated access for questions and answers. Apply permission classes to require login for all views.
Learn to implement custom permissions in Django REST Framework to restrict update and delete actions to resource owners. Use has_permission and has_object_permission in a practical example.
Explore how json web tokens enable token-based authentication without database validation in django rest framework. Configure simplejwt, obtain and refresh access tokens, and protect endpoints with bearer authorization.
Learn how to deploy a Django REST Framework project to PythonAnywhere, including configuring static files, collecting static, creating a virtual environment, installing requirements, and pushing via GitHub.
Upgrade the backend from Django 3.2.8 and Django REST Framework 3.12 to Django 4.0, refresh requirements, and apply migrations for the Q&A API. Then deploy the project to PythonAnywhere.
Upgrade to Django 4 and DRF 3.13, remove the Django restart, clone and push to GitHub, then deploy to Oracle using bash, virtualenv, Python 3.9, and install requirements.
Welcome to Django & Django REST Framework with React Frontend , so first of all what is Django ?
What is Django ?
Django is a Python Web Framework that is used for web development. Django framework uses a set of design principles that produces one of the most productive web development processes compared to many other web frameworks. also Django provides a set of tightly integrated components. all of these components are developed by the Django team itself, you can use Django as a Full stack Web Framework, it means that you can build frontend an backend in Django, or you can just build your backend REST API using Django REST Framework and you can integrate that with any frontend frameworks and libraries like reactjs, vuejs or mobile frontend like react native.
What is RESTFul API's ?
A RESTful API acts as a translator between two machines communicating over a Web service. If your familiar with the concept of API This is just like an API but it’s working on a RESTful Web service and the API is used by two applications trying to communicate with each other over a network or Internet. Web developers program REST API that server can receive data from applications. These applications can be web-apps, Android/iOS apps, etc. RESTful APIs return JSON files which can be interpreted by a variety of devices.
What is Django REST Framework ?
Django REST framework is a powerful and flexible toolkit for building Web APIs. Some reasons you might want to use REST framework:
The Web browsable API is a huge usability win for your developers.
Authentication policies including packages for OAuth1a and OAuth2.
Serialization that supports both ORM and non-ORM data sources.
Customizable all the way down – just use regular function-based views if you don’t need the more powerful features.
Extensive documentation, and great community support.
Used and trusted by internationally recognized companies including Mozilla, Red Hat, Heroku, and Eventbrite.
What is React ?
React is a free and open-source front-end JavaScript library for building user interfaces based on UI components. It is maintained by Meta and a community of individual developers and companies. React can be used as a base in the development of single-page or mobile applications
This course is divided in to different parts, in the first part we are going to have introduction to the course, in the second part we are going to build a blog application using django, in this section we focus on fundamental concepts of django, also we deploy our django app to Heroku, in the third part we are going to build a Chatbot using Google DialogFlow and after that we integrate our Chatbot with Django Blog Application. in the fourth part we are going to build a question and answer app and we deploy our app to PythonAnyWhere. in the fifth part we are going to dive in to building backend REST API using Django and Django REST Framework, we focus on fundamental concepts of Django REST Framework, also we deploy our Django REST Framework to Heroku. in the sixth part we create our backend REST API for our question and answer app, also we deploy our DRF in the PythonAnyWhere, in the seventh part we are going to integrate our Backend REST API with React Frontend.