Introduction to Pythonโ€™s Django

What is Web Development Web development is a broad term for any work that involves creating a web site for the Internet or an intranet. The end product of a web development project varies from simple sites composed of static web pages to complex applications that interact with databases and users. The list of tasks [โ€ฆ]

Read More

Writing Your First Python Django Application

Create A Django Project The previous article Introduction to Pythonโ€™s Django presented an overview of the Django Framework. In this article, we are going to write a simple Django application from scratch. The first step is to create a project using one of Djangoโ€™s built-in commands django-admin.py. In a Virtualenv, type this command: [shell] django-admin.py [โ€ฆ]

Read More

Writing Models for Your First Python Django Application

The previous article Writing Your First Python Django Application is a step-by-step guide on how to write a simple Django application from scratch. In this article, you will learn how to write models for your new Django application. Software Architectural Patterns Before we dive into the code, letโ€™s review two of the most popular server-side [โ€ฆ]

Read More

Activate Admin Application for Your Python Django Website

In the previous article , we learned how to write two models Post and Comment for your Django application myblog. In this article, we are going to learn how to activate Djangoโ€™s automatic admin site that provides a convenient interface for users or administrators of your website myblog to create, read, update and delete (CRUD) [โ€ฆ]

Read More

Writing Simple Views for Your First Python Django Application

In the previous article Activate Admin Application for Your Python Django Website, we learned how to activate the built-in Admin Application from Django in your website. In this article, we are going to write simple views for your website. What is a view? In Django, a view is an endpoint that can be accessed by [โ€ฆ]

Read More

Writing Views to Upload Posts for Your First Python Django Application

In the previous article, we wrote an index view to show a list of posts that are created less than two days ago and a detail view to show the detailed content of a post. In this article, weโ€™re going to write a view that allows the user to upload a post and improve our [โ€ฆ]

Read More

Writing Automated Tests for Your First Django Application

Tests, Tests and More Tests As a software programmer, you often hear others talking about tests being one of the most important components of any project. A software project often succeeds when thereโ€™s proper test coverage. While it often fails when thereโ€™s little or none. You might be wondering: what are tests anyway? Why is [โ€ฆ]

Read More

Writing Tests for Your Django Applicationโ€™s Views

Testing a Django Applicationโ€™s View In our previous article, we learned how to write automated tests for our Django application, which involves writing a simple test to verify the behaviour of the model method m.Post.recent_posts() and fixing the bug where the method recent_posts() returns future posts. In this article, we are going to learn how [โ€ฆ]

Read More

Managing Static Files for Your Django Application

Djangoโ€™s Default Static File Manager In every web application, static files such as css, Javascript and images, give the website a unique look-and-feel and make it stand out of the crowd. For any user, a beautiful, professional looking website is way more attractive than an rough, unpolished one. In a Django application, we manage the [โ€ฆ]

Read More

Package Your Python Django Application into a Reusable Component

Save Time by Writing and Using Reusable Python Django Apps Itโ€™s not trivial to design, develop and maintain a web application. Lots of features and aspects have to be handled properly in order for a web application to succeed. To name a few, the features that are common to almost every web application are user [โ€ฆ]

Read More