Python

Python Debugging Techniques

This article covers several techniques for debugging Python programs. The applicability of these techniques ranges from simple scripts to complex applications. The topics that are covered include launching an interactive console from within your program, using the Python debugger, and implementing robust logging. Various tips are included along the way to help you debug and fix problems quickly and efficiently.

Read more

Tags:
Submitted by Ayman on Mon, 2009/08/31 - 8:54am

"Django 1.0 Website Development" Released

My author copies of "Django 1.0 Website Development" have arrived. This is the second edition of my Django book. Django is a framework for building web applications in Python. This book explains how to assemble Django's features and take advantage of its power to design, develop, and deploy a fully-featured web site.

Django 1.0 Website Development

The new edition has been updated to Django 1.0. The key topics that the reader will learn from the book are:

  • Register users through a user authentication system and manage them efficiently.
  • Restrict user access to certain pages and protect against malicious input.
  • Create tags to allow site visitors to classify, view, and share content easily.
  • Create own administration interface for proper monitoring of the web site.
  • Enhance user interface with AJAX.
  • Enable voting and commenting on content, and display popular content to site visitors.
  • Build user networks; add friend management and invitation features for social networking.
  • Create unit tests to automate the testing of code.

The full table of contents is available.

The book is available in paper and PDF formats at Packt Publishing. It is also available from all major book sellers like Amazon.

Writing the book and revising it have been an enjoyable experience for me. The feeling of accomplishment when my copies arrived is satisfying. I sincerely hope that readers find the book interesting and useful. If you have questions or comments, don't hesitate to email me!

More photos of the book are available at my Picasa web albums.

Read more

Tags:
Submitted by Ayman on Mon, 2009/03/23 - 12:14am

TurboGears Tutorial: Social Bookmarking Application

Anyone interested in web development should have heard about the Model-View-Controller software pattern by now. This pattern emphasizes on separation of application's data model, UI (view), and control logic. The concept itself isn't new and has been around since 1979, but recently there have been many successful implementations of the pattern in the domain of web development.

Like any self-respecting web developer, I started to explore the available frameworks, and quickly settled on Python as a language and TurboGears as a framework. I viewed many webcasts and documents, then decided to practice my newly gained knowledge by writing a basic del.icio.us-like social bookmarking application in TurboGears. Now I'm documenting my work as a tutorial, hoping that other TurboGears newcomers would find something useful in it. The tutorial covers the following concepts:

  • Designing data models.
  • Developing controller Logic.
  • Creating view templates.
  • Working with forms and widgets.

There are also sections for the reasons behind my Python/TurboGears choice, and the installation process.

Please read on for the tutorial itself and an attachment of the project's source code at the end. I recommend viewing the code while working with the tutorial, as I didn't include imports or other tiny bits. In addition, the tutorial assumes good knowledge of Python.

Read more


Syndicate content

About

Ayman Hourieh

Computer Science graduate, Open Source enthusiast and Software engineer (Site reliability) at Google.

I'm 26 years old, and live in Dublin, Ireland.

This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.

More

Feeds

RSS Feed Twitter

Books

Django 1.0 Website Development

Django 1.0 Website Development
Build powerful web applications, quickly and cleanly, with the Django application framework.

The second edition of my Django book. Published by Packt Publishing in March 2009.

Learning Website Development with Django

Learning Website Development with Django
A beginner's tutorial to building web applications, quickly and cleanly, with the Django application framework.

My first book. Published by Packt Publishing in April 2008.