Contents
Django Apps, Views, and URLs
Creating Django Apps
In Django, a project is the whole website. An app is a self-contained module within that project that handles one specific feature — like courses, users, blog posts, or payments. One project can contain many apps, and a well-built app can be reused across multiple projects.

After creating the app, you must register it in settings.py:

Without this step, Django won't recognize your app's models, templates, or migrations.
Working with Views
A view is where your logic lives. At the beginner level, you'll write function-based views — plain Python functions that take a request and return a response.

get_object_or_404 is one of Django's most useful shortcuts. Instead of crashing with an unhandled exception when a record doesn't exist, it returns a clean 404 page.
URL Routing Basics
Wire the views to URLs in two steps. First, create a urls.py file inside your app:

Then include your app's URLs in the project's root URL file.










