Django Project Vs App and First Django Project
Django Project Vs App and First Django Project
HT EASY LEARNING
HT EASY LEARNING
The beauty of Django apps is their reusability. You can develop a well-designed
app and use it in multiple projects without significant modifications.
Example- Withdraw app, loan app, shopping cart, registration, user profile,
feedback etc.
HT EASY LEARNING
HT EASY LEARNING
Now we are going to discuss what are all these python files that are
automatically created when we create a project.
__init__.py-
It is a blank python script. Because of this special file name, Django treat this
folder as python package.
HT EASY LEARNING
HT EASY LEARNING
asgi.py (optional)-
This file configures your project to run using the Asynchronous Server Gateway
Interface (ASGI). It's typically used for deploying Django applications in modern
web servers like Asgi servers
wsgi.py-
This file configures your project to run using the Web Server Gateway Interface
(WSGI). This is the traditional way to run Django applications on web servers.
We can use this file while deploying our application in production on online server.
manage.py-
This is a crucial script that serves as the command center for your project. You'll
use manage.py for various tasks like running the development server, creating
database tables (migrations), creating apps, and running administrative
commands.
settings.py-
This is the heart of your project's configuration. It contains all the critical settings
that govern the behavior of your Django application, including:
• Database connection details
• Secret keys for security purposes
• Installed applications (including your own apps)
HT EASY LEARNING
HT EASY LEARNING
urls.py-
This file defines the URL patterns for your entire project. It maps incoming URLs to
specific views (functions) within your application, essentially acting as a roadmap
for how users access different parts of your website.
HT EASY LEARNING
HT EASY LEARNING
Web Server-
• Purpose: A web server is a software program that runs on a computer and
is responsible for:
o Receiving HTTP requests: When you enter a website address (URL) in
your web browser, it sends an HTTP request to the web server
associated with that website.
o Processing requests: The web server interprets the request, which
typically specifies a web page or resource (like an image or file) on
the website.
HT EASY LEARNING
HT EASY LEARNING
HT EASY LEARNING
HT EASY LEARNING
In the next video we are going to create our first Django Application.
HT EASY LEARNING