Django App vs Project

Django App vs Project

Everything in Django is centered around the idea of apps. Apps in Django are the self-contained directories that hold files that all work together to provide specific functionality for your Project. A Django project may consist of a single app, or many apps to provide its service. In fact, there is a site dedicated to providing developers all kinds of reusable apps, tools, and more for your Django projects.…

Django HTML Pages

Django HTML Pages

In this tutorial, we are going to explore how to render HTML with Django using Templates. Django is written in Python and is different than how things work in say PHP for example. In PHP we can mix PHP with HTML to output web pages. Django and Python work a little differently. In Django, we use the Django Template Language or DTL templates to output dynamic data generated by Python and Django into HTML pages.…

Django URLs and Views

Django URLs and Views

In this tutorial, we will be looking a little more closely at how Routing works in Django. Any web application needs to look at incoming Http requests and decide what to do with that request. Most times, the application will gather some relevant data, package it up in an Http response, and send it back to the browser. In Django, this process is handled by two files.…

Django Debug Toolbar

Django Debug Toolbar

There are a lot of moving parts underneath the hood of a Django web application. Much of it is very transparent to the user of the site, but it is important for the web developer to know how things are working in order to understand how to debug problems. Django has a Debug Toolbar you can install to allow full inspection of the Django environment during development.…

Django Admin Setup

Django Admin Setup

We’ve made a lot of progress getting started with Django building our small Dog website. We’ve learned about getting Django setup, and creating some basic web pages that display information about Dogs in our system. Currently, the only way to interact with the data for our website is via a web browser on the front end of the site. Django has an administrative backend that is pre-built for you.…

Django Templates

Django Templates

Django templates are HTML files with extra syntax to allow using variables, loops, and other control structures. When a view calls the render() function, it passes data into the template and the template generates the HTML to show to the user. This is a very similar concept in many MVC and MVT web frameworks. Django makes use of a built-in backend for its own template system that is called the Django Template Language or DTL.…

Django For Beginners

Django For Beginners

Django is a popular web framework built with Python that allows developers to quickly create maintainable web applications. In this tutorial, we’ll take a look at Django by getting it installed and setting up a simple project. Next, we’ll take a look at how models, URL patterns, views, and templates are used in Django to create powerful modular code for a web application.…