"Two scoops of Django introduces you to various tips, tricks, patterns, code snippets, and techniques . . ."--Page 4 of cover.
"Two scoops of Django introduces you to various tips, tricks, patterns, code snippets, and techniques . . ."--Page 4 of cover.
If you want to learn how best to utilize commonly found patterns and learn best practices in developing applications with Django, this is the book for you. This book, like Django itself, is accessible to amateur and professional developers alike and assumes little in the way of prior experience. Although written for Python 3, the majority of the code in this book works in Python 2 or can be easily translated.
By taking you through the development of a real web application from beginning to end, this hands-on guide demonstrates the practical advantages of test-driven development (TDD) with Python. You’ll learn how to write and run tests before building each part of your app, and then develop the minimum amount of code required to pass those tests. The result? Clean code that works. In the process, you’ll learn the basics of Django, Selenium, Git, jQuery, and Mock, along with current web development techniques. If you’re ready to take your Python skills to the next level, this book clearly demonstrates how TDD encourages simple designs and inspires confidence. Dive into the TDD workflow, including the unit test/code cycle and refactoring Use unit tests for classes and functions, and functional tests for user interactions within the browser Learn when and how to use mock objects, and the pros and cons of isolated vs. integrated tests Test and automate your deployments with a staging server Apply tests to the third-party plugins you integrate into your site Use a Continuous Integration environment to run your tests automatically
If you have created websites with Django, but you want to sharpen your knowledge and learn some good approaches for how to treat different aspects of web development, you should definitely read this book. It is intended for intermediate and professional Django users who need to build projects which must be multilingual, functional on devices of different screen sizes, and which scale over time.
Django is the leading Python web application development framework. Learn how to leverage the Django web framework to its full potential in this advanced tutorial and reference. Endorsed by Django, Pro Django more or less picks up where The Definitive Guide to Django left off and examines in greater detail the unusual and complex problems that Python web application developers can face and how to solve them. Provides in–depth information about advanced tools and techniques available in every Django installation Runs the gamut from the theory of Django’s internal operations to actual code that solves real–world problems for high–volume environments Goes above and beyond other books, leaving the basics behind Shows how Django can do things even its core developers never dreamed possible
This latest edition of The Definitive Guide to Django is updated for Django 1.1, and, with the forward–compatibility guarantee that Django now provides, should serve as the ultimate tutorial and reference for this popular framework for years to come. Django, the Python–based equivalent to Ruby's Rails web development framework, is one of the hottest topics in web development today. Lead developer Jacob Kaplan–Moss and Django creator Adrian Holovaty show you how they use this framework to create award–winning web sites by guiding you through the creation of a web application reminiscent of ChicagoCrime.org. The Definitive Guide to Django is broken into three parts, with the first introducing Django fundamentals such as installation and configuration, and creating the components that together power a Django–driven web site. The second part delves into the more sophisticated features of Django, including outputting non–HTML content such as RSS feeds and PDFs, caching, and user management. The appendixes serve as a detailed reference to Django's many configuration options and commands.
Delivers absolutely everything you will ever need to know to become a master Django programmer About This Book Gain a complete understanding of Django—the most popular, Python-based web framework in the world Gain the skills to successfully designing, developing, and deploying your app This book is packaged with fully described code so you can learn the fundamentals and the advanced topics to get a complete understanding of all of Django's core functions Who This Book Is For This book assumes you have a basic understanding of the Internet and programming. Experience with Python or Django would be an advantage, but is not necessary. It is ideal for beginner to intermediate programmers looking for a fast, secure, scalable, and maintainable alternative web development platform to those based on PHP, Java, and dotNET. What You Will Learn Use Django to access user-submitted form data, validate it, and work with it Get to know advanced URLconf tips and tricks Extend Django's template system with custom code Define models and use the database API to create, retrieve, update, and delete records Fully extend and customize the default implementation as per your project's needs Test and deploy your Django application Get to know more about Django's session, cache Framework, and middleware In Detail Mastering Django: Core is a completely revised and updated version of the original Django Book, written by Adrian Holovaty and Jacob Kaplan-Moss - the creators of Django. The main goal of this book is to make you a Django expert. By reading this book, you'll learn the skills needed to develop powerful websites quickly, with code that is clean and easy to maintain. This book is also a programmer's manual that provides complete coverage of the current Long Term Support (LTS) version of Django. For developers creating applications for commercial and business critical deployments, Mastering Django: Core provides a complete, up-to-date resource for Django 1.8LTS with a stable code-base, security fixes and support out to 2018. Style and approach This comprehensive step-by-step practical guide offers a thorough understanding of all the web development concepts related to Django. In addition to explaining the features of Django, this book provides real-world experience on how these features fit together to build extraordinary apps.
Build a Django content management system, blog, and social networking site with James Bennett as he introduces version 1.1 of the popular Django framework. You’ll work through the development of each project, implementing and running the applications while learning new features along the way. Web frameworks are playing a major role in the creation of today’s most compelling web applications, because they automate many of the tedious tasks, allowing developers to instead focus on providing users with creative and powerful features. Python developers have been particularly fortunate in this area, having been able to take advantage of Django, a very popular open-source web framework whose stated goal is to "make it easier to build better web applications more quickly with less code." Practical Django Projects introduces this popular framework by way of a series of real–world projects. Readers follow along with the development of each project, implementing and running each application while learning new features along the way. This edition is updated for Django 1.1 and includes an all-new chapter covering practical development tools and techniques you'll be able to apply to your own development workflow. What you’ll learn Capitalize upon the well–defined and stable framework architecture of Django 1.1 to build web applications faster than ever before Learn by doing by working through the creation of three real–world projects, including a content management system, blog, and social networking site Build user–friendly web sites with well–structured URLs, session tracking, and syndication options Let Django handle tedious tasks such as database interaction while you focus on building compelling applications Who this book is for Web developers seeking to use the powerful Django framework to build powerful web sites. Table of Contents Welcome to Django Your First Django Site: A Simple CMS Customizing the Simple CMS A Django-Powered Weblog Expanding the Weblog Templates for the Weblog Finishing the Weblog A Social Code-Sharing Site Form Processing in the Code-Sharing Application Finishing the Code-Sharing Applications Practical Development Techniques Writing Reusable Django Applications
Using the simple, robust, Python-based Django framework, you can build powerful Web solutions with remarkably few lines of code. In Python Web Development with Django®, three experienced Django and Python developers cover all the techniques, tools, and concepts you need to make the most of Django 1.0, including all the major features of the new release. The authors teach Django through in-depth explanations, plus provide extensive sample code supported with images and line-by-line explanations. You’ll discover how Django leverages Python’s development speed and flexibility to help you solve a wide spectrum of Web development problems and learn Django best practices covered nowhere else. You’ll build your first Django application in just minutes and deepen your real-world skills through start-to-finish application projects including Simple Web log (blog) Online photo gallery Simple content management system Ajax-powered live blogger Online source code sharing/syntax highlighting tool How to run your Django applications on the Google App Engine This complete guide starts by introducing Python, Django, and Web development concepts, then dives into the Django framework, providing a deep understanding of its major components (models, views, templates), and how they come together to form complete Web applications. After a discussion of four independent working Django applications, coverage turns to advanced topics, such as caching, extending the template system, syndication, admin customization, and testing. Valuable reference appendices cover using the command-line, installing and configuring Django, development tools, exploring existing Django applications, the Google App Engine, and how to get more involved with the Django community. Introduction 1 Part I: Getting Started Chapter 1: Practical Python for Django 7 Chapter 2: Django for the Impatient: Building a Blog 57 Chapter 3: Starting Out 77 Part II: Django in Depth Chapter 4: Defining and Using Models 89 Chapter 5: URLs, HTTP Mechanisms, and Views 117 Chapter 6: Templates and Form Processing 135 Part III: Django Applications by Example Chapter 7: Photo Gallery 159 Chapter 8: Content Management System 181 Chapter 9: Liveblog 205 Chapter 10: Pastebin 221 Part IV: Advanced Django Techniques and Features Chapter 11: Advanced Django Programming 235 Chapter 12: Advanced Django Deployment 261 Part V: Appendices Appendix A: Command Line Basics 285 Appendix B: Installing and Running Django 295 Appendix C: Tools for Practical Django Development 313 Appendix D: Finding, Evaluating, and Using Django Applications 321 Appendix E: Django on the Google App Engine 325 Appendix F: Getting Involved in the Django Project 337 Index 339 Colophon 375
Django is an amazingly powerful system for creating modern, dynamic websites. But programming Django hasn’t always been easy—until now. Django Unleashed is your step-by-step, beginner-friendly guide to leveraging Django’s core capabilities and its powerful contributed library. You’ll learn in the most effective way possible: hands on, by building a fully functional Django website from scratch. You’ll even deploy the website to the cloud. As you build your website, expert Django consultant and trainer Andrew Pinkham reveals how websites operate; how Django makes building websites easy; how to write Python code that leverages its immense capabilities; and how to build solutions that are robust, reliable, and secure. You’ll start simply and learn to solve increasingly challenging problems: mastering new features and understanding how Django’s architecture shapes their behavior, and gaining essential knowledge for working with any web framework, not just Django.
Python is a wonderful programming language that is being used more and more in many different industries. It is fast, flexible, and it comes with batteries included. Most of the books you read about Python will teach you the language basics – but once you've learnt them, you’re on your own in designing your application and discovering best practice. In this book, we'll see how you can leverage Python to efficiently tackle your problems and build great Python applications.
Build a world-class website in less than a week with Django CMS. Beginning Django CMS shows you how to simply and easily write a dynamic website with a full content management system in the backend. It is written for Internet developers who are sick and tired of dealing with complicated, bloated website frameworks that are a pain to build and a nightmare to maintain. Django CMS is an Open Source website building framework that is experiencing exponential growth because it is built on the simple, secure and scalable architecture of Django. This book takes you from knowing nothing about Django CMS, to building a functional website and content management system that you can deploy for your own website or for your customers. What You'll Learn: Install and configure Django CMS Build a dynamic website quickly and easily Author and submit content for publication Administer Django CMS Install and use custom and third-party plugins Deploy a website using Django CMS Who This Book is For: Beginning Django CMS is for programmers, in particular Python and Django programmers, wishing to build a simple, custom content management system (CMS). They do not have to be directly interested in the Django CMS application, Beginning Django CMS will be equally useful to a programmer looking to build a functioning CMS rapidly.
Python is an ideal language for solving problems, especially in Linux and Unix networks. With this pragmatic book, administrators can review various tasks that often occur in the management of these systems, and learn how Python can provide a more efficient and less painful way to handle them. Each chapter in Python for Unix and Linux System Administration presents a particular administrative issue, such as concurrency or data backup, and presents Python solutions through hands-on examples. Once you finish this book, you'll be able to develop your own set of command-line utilities with Python to tackle a wide range of problems. Discover how this language can help you: Read text files and extract information Run tasks concurrently using the threading and forking options Get information from one process to another using network facilities Create clickable GUIs to handle large and complex utilities Monitor large clusters of machines by interacting with SNMP programmatically Master the IPython Interactive Python shell to replace or augment Bash, Korn, or Z-Shell Integrate Cloud Computing into your infrastructure, and learn to write a Google App Engine Application Solve unique data backup challenges with customized scripts Interact with MySQL, SQLite, Oracle, Postgres, Django ORM, and SQLAlchemy With this book, you'll learn how to package and deploy your Python applications and libraries, and write code that runs equally well on multiple Unix platforms. You'll also learn about several Python-related technologies that will make your life much easier.