Artificial intelligence, the big deal for 2018

Read More

Testing a Django Web Application – Unit Testing

This tutorial shows how to write and carry out unit testing of your website using Django’s test framework. As we begin to build websites and other applications, and as interactions with such websites or application components become complex and not easy to investigate, a small change in one component of the website or application can impact other areas and components, so more changes will be required to ensure everything keeps working and errors are not introduced as more changes are made. One way to mitigate these problems is to write automated tests, which can easily and reliably be run every time you make a change. For example, manually navigating through pages to verify that it’s not rendering errors when a view or model in your django application is altered could be a hell of a task and very frustrating; also it’s time consuming, If we were to continue as we are, eventually we’d be spending most of our time testing, and very little time improving our code

Read More

Host Your First Website in Pythonanywhere

Host Your First Website in Pythonanywhere. PythonAnywhere makes it easy to create and run Python programs in the cloud. You can write your programs in a web-based editor or just run a console session from any modern web browser. There’s storage space on the servers, and you can preserve your session state and access it from anywhere To get started visit pythonanywhere.com to create an account.

Read More

Getting Started With Django – Part 5

Django Forms Creating, validating and processing forms is an all too common task. Web applications receive input and collect data from users by means of web forms. So naturally Django comes with its own library to handle these tasks. In Django 0.96, the library is called newforms but it will be renamed to forms in Django 1.0 (once it has been released). In this section of the tutorial we’ll create a form to enable us enter post without using the admin interface, before that let us create the views for creating, displaying post detail, updating and deleting forms.

Read More

Getting Started With Django – Part 3

Models: Designing an Initial Database Schema. We are to create a database table for posts. We will chose the database engine that configured our database settings in the previous part. If you are used to dealing with the database directly through SQL queries, then you may find Django’s approach to database access a bit different. Loosely speaking, Django abstracts access to database tables through Python classes. To store, manipulate and retrieve objects from the database, the developer uses a Python-based API. In order to do this, SQL knowledge is useful but not required. This technique is best explained by example, so let’s get started.

Read More

Getting Started With Django – Part 1

Django is a free open-source web framework, written in Python, It is maintained by the Django Software Foundation (DSF), an independent organization established as a non-profit. Django’s primary goal is to ease the creation of complex, database-driven websites. Django emphasizes reusabibilty and “pluggability” of components, rapid development, and the principle of DRY (Don’t repeat yourselt). Python is used throughout, even for settings files and data models. Django also provides an optional administrative create, read, update and delete interface that is generated dynamically through introspection and configured via admin models.

Read More