Categories
Ebooks
-
Business and economy
- Bitcoin
- Businesswoman
- Coaching
- Controlling
- E-business
- Economy
- Finances
- Stocks and investments
- Personal competence
- Computer in the office
- Communication and negotiation
- Small company
- Marketing
- Motivation
- Multimedia trainings
- Real estate
- Persuasion and NLP
- Taxes
- Social policy
- Guides
- Presentations
- Leadership
- Public Relation
- Reports, analyses
- Secret
- Social Media
- Sales
- Start-up
- Your career
- Management
- Project management
- Human Resources
-
For children
-
For youth
-
Education
-
Encyclopedias, dictionaries
-
E-press
- Architektura i wnętrza
- Biznes i Ekonomia
- Home and garden
- E-business
- Finances
- Personal finance
- Business
- Photography
- Computer science
- HR & Payroll
- Computers, Excel
- Accounts
- Culture and literature
- Scientific and academic
- Environmental protection
- Opinion-forming
- Education
- Taxes
- Travelling
- Psychology
- Religion
- Agriculture
- Book and press market
- Transport and Spedition
- Healthand beauty
-
History
-
Computer science
- Office applications
- Data bases
- Bioinformatics
- IT business
- CAD/CAM
- Digital Lifestyle
- DTP
- Electronics
- Digital photography
- Computer graphics
- Games
- Hacking
- Hardware
- IT w ekonomii
- Scientific software package
- School textbooks
- Computer basics
- Programming
- Mobile programming
- Internet servers
- Computer networks
- Start-up
- Operational systems
- Artificial intelligence
- Technology for children
- Webmastering
-
Other
-
Foreign languages
-
Culture and art
-
School reading books
-
Literature
- Antology
- Ballade
- Biographies and autobiographies
- For adults
- Dramas
- Diaries, memoirs, letters
- Epic, epopee
- Essay
- Fantasy and science fiction
- Feuilletons
- Work of fiction
- Humour and satire
- Other
- Classical
- Crime fiction
- Non-fiction
- Fiction
- Mity i legendy
- Nobelists
- Novellas
- Moral
- Okultyzm i magia
- Short stories
- Memoirs
- Travelling
- Narrative poetry
- Poetry
- Politics
- Popular science
- Novel
- Historical novel
- Prose
- Adventure
- Journalism, publicism
- Reportage novels
- Romans i literatura obyczajowa
- Sensational
- Thriller, Horror
- Interviews and memoirs
-
Natural sciences
-
Social sciences
-
School textbooks
-
Popular science and academic
- Archeology
- Bibliotekoznawstwo
- Cinema studies
- Philology
- Polish philology
- Philosophy
- Finanse i bankowość
- Geography
- Economy
- Trade. World economy
- History and archeology
- History of art and architecture
- Cultural studies
- Linguistics
- Literary studies
- Logistics
- Maths
- Medicine
- Humanities
- Pedagogy
- Educational aids
- Popular science
- Other
- Psychology
- Sociology
- Theatre studies
- Theology
- Economic theories and teachings
- Transport i spedycja
- Physical education
- Zarządzanie i marketing
-
Guides
-
Game guides
-
Professional and specialist guides
-
Law
- Health and Safety
- History
- Road Code. Driving license
- Law studies
- Healthcare
- General. Compendium of knowledge
- Academic textbooks
- Other
- Construction and local law
- Civil law
- Financial law
- Economic law
- Economic and trade law
- Criminal law
- Criminal law. Criminal offenses. Criminology
- International law
- International law
- Health care law
- Educational law
- Tax law
- Labor and social security law
- Public, constitutional and administrative law
- Family and Guardianship Code
- agricultural law
- Social law, labour law
- European Union law
- Industry
- Agricultural and environmental
- Dictionaries and encyclopedia
- Public procurement
- Management
-
Tourist guides and travel
- Africa
- Albums
- Southern America
- North and Central America
- Australia, New Zealand, Oceania
- Austria
- Asia
- Balkans
- Middle East
- Bulgary
- China
- Croatia
- The Czech Republic
- Denmark
- Egipt
- Estonia
- Europe
- France
- Mountains
- Greece
- Spain
- Holand
- Iceland
- Lithuania
- Latvia
- Mapy, Plany miast, Atlasy
- Mini travel guides
- Germany
- Norway
- Active travelling
- Poland
- Portugal
- Other
- Russia
- Romania
- Slovakia
- Slovenia
- Switzerland
- Sweden
- World
- Turkey
- Ukraine
- Hungary
- Great Britain
- Italy
-
Psychology
- Philosophy of life
- Kompetencje psychospołeczne
- Interpersonal communication
- Mindfulness
- General
- Persuasion and NLP
- Academic psychology
- Psychology of soul and mind
- Work psychology
- Relacje i związki
- Parenting and children psychology
- Problem solving
- Intellectual growth
- Secret
- Sexapeal
- Seduction
- Appearance and image
- Philosophy of life
-
Religion
-
Sport, fitness, diets
-
Technology and mechanics
Audiobooks
-
Business and economy
- Bitcoin
- Businesswoman
- Coaching
- Controlling
- E-business
- Economy
- Finances
- Stocks and investments
- Personal competence
- Communication and negotiation
- Small company
- Marketing
- Motivation
- Real estate
- Persuasion and NLP
- Taxes
- Guides
- Presentations
- Leadership
- Public Relation
- Secret
- Social Media
- Sales
- Start-up
- Your career
- Management
- Project management
- Human Resources
-
For children
-
For youth
-
Education
-
Encyclopedias, dictionaries
-
History
-
Computer science
-
Other
-
Foreign languages
-
Culture and art
-
School reading books
-
Literature
- Antology
- Ballade
- Biographies and autobiographies
- For adults
- Dramas
- Diaries, memoirs, letters
- Epic, epopee
- Essay
- Fantasy and science fiction
- Feuilletons
- Work of fiction
- Humour and satire
- Other
- Classical
- Crime fiction
- Non-fiction
- Fiction
- Mity i legendy
- Nobelists
- Novellas
- Moral
- Okultyzm i magia
- Short stories
- Memoirs
- Travelling
- Poetry
- Politics
- Popular science
- Novel
- Historical novel
- Prose
- Adventure
- Journalism, publicism
- Reportage novels
- Romans i literatura obyczajowa
- Sensational
- Thriller, Horror
- Interviews and memoirs
-
Natural sciences
-
Social sciences
-
Popular science and academic
-
Guides
-
Professional and specialist guides
-
Law
-
Tourist guides and travel
-
Psychology
- Philosophy of life
- Interpersonal communication
- Mindfulness
- General
- Persuasion and NLP
- Academic psychology
- Psychology of soul and mind
- Work psychology
- Relacje i związki
- Parenting and children psychology
- Problem solving
- Intellectual growth
- Secret
- Sexapeal
- Seduction
- Appearance and image
- Philosophy of life
-
Religion
-
Sport, fitness, diets
-
Technology and mechanics
Videocourses
-
Data bases
-
Big Data
-
Biznes, ekonomia i marketing
-
Cybersecurity
-
Data Science
-
DevOps
-
For children
-
Electronics
-
Graphics/Video/CAX
-
Games
-
Microsoft Office
-
Development tools
-
Programming
-
Personal growth
-
Computer networks
-
Operational systems
-
Software testing
-
Mobile devices
-
UX/UI
-
Web development
-
Management
Podcasts
E-book details
Log in, If you're interested in the contents of the item.
Django 1.1 Testing and Debugging. Building rigorously tested and bug-free Django applications
Karen M. Tracey, Karen Tracey, Jacob Kaplan-Moss
Ebook
Bugs are a time consuming burden during software development. Django's built-in test framework and debugging support help lessen this burden. This book will teach you quick and efficient techniques for using Django and Python tools to eradicate bugs and ensure your Django application works correctly. This book will walk you step by step through development of a complete sample Django application. You will learn how best to test and debug models, views, URL configuration, templates, and template tags. This book will help you integrate with and make use of the rich external environment of test and debugging tools for Python and Django applications. The book starts with a basic overview of testing. It will highlight areas to look out for while testing. You will learn about different kinds of tests available, and the pros and cons of each, and also details of test extensions provided by Django that simplify the task of testing Django applications. You will see an illustration of how external tools that provide even more sophisticated testing features can be integrated into Django's framework. On the debugging front, the book illustrates how to interpret the extensive debugging information provided by Django's debug error pages, and how to utilize logging and other external tools to learn what code is doing.
- Django 1.1 Testing and Debugging
- Table of Contents
- Django 1.1 Testing and Debugging
- Credits
- About the Author
- About the Reviewer
- Preface
- What this book covers
- What you need for this book
- Who this book is for
- Conventions
- Reader feedback
- Customer support
- Errata
- Piracy
- Questions
- 1. Django Testing Overview
- Getting started: Creating a new application
- Understanding the sample unit test
- Understanding the sample doctest
- Running the sample tests
- Breaking things on purpose
- Test errors versus test failures
- Command line options for running tests
- Verbosity
- Settings
- Pythonpath
- Traceback
- Noinput
- Version
- Summary
- 2. Does This Code Work? Doctests in Depth
- The Survey application models
- Testing the Survey model
- Testing Survey model creation
- Is that test useful?
- Developing a custom Survey save method
- Deciding what to test
- Some pros and cons of doctests so far
- Additional doctest caveats
- Beware of environmental dependence
- Beware of database dependence
- Beware of test interdependence
- Beware of Unicode
- Summary
- 3. Testing 1, 2, 3: Basic Unit Testing
- Unit tests for the Survey save override method
- Pros of the unit test version
- Cons of the unit test version
- Revisiting the doctest caveats
- Environmental dependence
- Database dependence
- Test interdependence
- Unicode
- Providing data for unit tests
- Providing data in test fixtures
- Example test that needs test data
- Using the admin application to create test data
- Writing the function itself
- Writing a test that uses the test data
- Extracting the test data from the database
- Getting the test data loaded during the test run
- Creating data during test set up
- Providing data in test fixtures
- Summary
- Unit tests for the Survey save override method
- 4. Getting Fancier: Django Unit Test Extensions
- Organizing tests
- Creating the survey application home page
- Defining the survey application URLs
- Developing views to serve pages
- Creating templates for pages
- Testing the survey home page
- Creating the survey detail pages
- Refining the survey detail view
- Templates for the survey detail pages
- Basic testing of the survey detail pages
- Customizing the admin add and change survey pages
- Developing a custom survey form
- Configuring admin to use the custom form
- Testing the admin customization
- Additional test support
- Supporting additional HTTP methods
- Maintaining persistent state
- E-mail services
- Providing test-specific URL configuration
- Response context and template information
- Testing transactional behavior
- Summary
- 5. Filling in the Blanks: Integrating Django and Other Test Tools
- Problems of integration
- Specifying an alternative test runner
- Creating a new management command
- How much of the code are we testing?
- Using coverage standalone
- Integrating coverage into a Django project
- The twill web browsing and testing tool
- Using the twill command line program
- Using twill in a TestCase
- Summary
- Problems of integration
- 6. Django Debugging Overview
- Django debug settings
- The DEBUG and TEMPLATE_DEBUG settings
- The TEMPLATE_STRING_IF_INVALID setting
- Debug error pages
- Database query history
- Debug support in the development server
- Handling problems in production
- Creating general error pages
- Reporting production error information
- Internal server error notifications
- Page not found notifications
- Summary
- Django debug settings
- 7. When the Wheels Fall Off: Understanding a Django Debug Page
- Starting the Survey voting implementation
- Creating test data for voting
- Defining a question form for voting
- Debug page #1: TypeError at /
- Elements of the debug page
- Basic error information
- Traceback
- Request information
- GET
- POST
- FILES
- COOKIES
- META
- Settings
- Understanding and fixing the TypeError
- Handling multiple Survey questions
- Creating the data for multiple questions
- Coding support for multiple questions
- Debug page #2: TemplateSyntaxError at /1/
- Understanding and fixing the TemplateSyntaxError
- Recording Survey responses
- Coding support for recording Survey responses
- Debug page #3: NoReverseMatch at /1/
- Understanding and fixing the NoReverseMatch exception
- Debug page #4: TemplateDoesNotExist at /thanks/1/
- Understanding and fixing TemplateDoesNotExist
- Handling invalid Survey submissions
- Coding custom error message and placement
- Debug page #5: Another TemplateSyntaxError
- Fixing the second TemplateSyntaxError
- Summary
- Starting the Survey voting implementation
- 8. When Problems Hide: Getting More Information
- Tracking SQL queries for a request
- Settings for accessing query history in templates
- SQL queries for the home page
- Packaging the template query display for reuse
- Testing the repackaged template code
- SQL queries for the active Survey form display page
- SQL queries for posting survey answers
- The Django Debug Toolbar
- Installing the Django Debug Toolbar
- Debug toolbar appearance
- The SQL panel
- The Time panel
- The Settings panel
- The HTTP Headers panel
- The Request Vars panel
- The Templates panel
- The Signals panel
- The Logging panel
- Redirect handling by the debug toolbar
- Tracking internal code state
- Resist the urge to sprinkle prints
- Simple logging configuring for development
- Deciding what to log
- Decorators to log function entry and exit
- Applying the decorators to the Survey code
- Logging in the debug toolbar
- Summary
- Tracking SQL queries for a request
- 9. When You Dont Even Know What to Log: Using Debuggers
- Implementing the Survey results display
- Results display using pygooglechart
- Getting started with the debugger
- The list command
- The where command
- The args command
- The whatis command
- The print and pp commands
- Debugging the pygooglechart results display
- The step and next commands
- The continue command
- The jump command
- The break command
- The clear command
- Fixing the pygooglechart results display
- The up and down commands
- The return command
- Results display using matplotlib
- Improving the matplotlib approach
- Setting up static file serving
- Dynamically generating image files
- Dealing with race conditions
- Using the debugger to force race situations
- Notes on using graphical debuggers
- Summary
- 10. When All Else Fails: Getting Outside Help
- Tracking down a problem in Django
- Revisiting the Chapter 7 voting form
- Is the right code actually running?
- Is the code correct as per the documentation?
- Searching for a matching problem report
- Another way to search for a matching problem report
- Determining the release that contains a fix
- What if a fix hasn't been released yet?
- What if a fix hasn't been committed yet?
- What if a ticket has been closed without a fix?
- Tracking down unreported problems
- Where to ask questions
- Tips on asking questions that will get good answers
- Opening a new ticket to report a problem
- Summary
- Tracking down a problem in Django
- 11. When it's Time to Go Live: Moving to Production
- Developing an Apache/mod_wsgi configuration
- Creating the WSGI script for the marketr project
- Creating an Apache VirtualHost for the marketr project
- Activating the new Apache configuration
- Debugging the new Apache configuration
- Configuring Apache to serve static files
- Testing multithreaded behavior
- Generating load with siege
- Load testing the results recording code
- Fixing the results recording code
- Additional load testing notes
- Using Apache/mod_wsgi during development
- Summary
- Developing an Apache/mod_wsgi configuration
- Index
- Title: Django 1.1 Testing and Debugging. Building rigorously tested and bug-free Django applications
- Author: Karen M. Tracey, Karen Tracey, Jacob Kaplan-Moss
- Original title: Django 1.1 Testing and Debugging. Building rigorously tested and bug-free Django applications
- ISBN: 9781847197573, 9781847197573
- Date of issue: 2010-04-19
- Format: Ebook
- Item ID: e_3b5w
- Publisher: Packt Publishing