Django 1.1 Testing and Debugging

By Karen M. Tracey

This e-book teaches by way of instance. It walks intimately via improvement of a pattern software, illustrating each one step through entire operating code and both screenshots or console snippets. The bulky and time eating activity of debugging might be a cake stroll with this book.If you're a Django program developer who desires to create powerful purposes speedy that paintings good and are effortless to keep up within the long-term, this publication is for you. This publication is the proper choose on the way to be well tutored to make top use of Django's wealthy checking out and debugging help and make trying out a simple task.Basic wisdom of Python, Django, and the general constitution of a database-driven internet program is believed. even if, the code samples are totally defined in order that even newbies who're new to the world can research very much from this e-book.

Show description

Preview of Django 1.1 Testing and Debugging PDF

Similar Programming books

Joe Celko's SQL for Smarties: Advanced SQL Programming Third Edition (The Morgan Kaufmann Series in Data Management Systems)

SQL for Smarties used to be hailed because the first ebook dedicated explicitly to the complex ideas had to remodel an skilled SQL programmer into knowledgeable. Now, 10 years later and within the 3rd variation, this vintage nonetheless reigns best because the e-book written via an SQL grasp that teaches destiny SQL masters.

Designing Audio Effect Plug-Ins in C++: With Digital Audio Signal Processing Theory

Not only one other theory-heavy electronic sign processing e-book, nor one other boring build-a-generic-database programming publication, Designing Audio impact Plug-Ins in C++ provides every little thing you every thing you must understand to just do that, together with absolutely labored, downloadable code for dozens audio impact plug-ins and essentially offered algorithms.

Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition)

“Every C++ expert wishes a duplicate of potent C++. it really is an absolute must-read for a person considering doing severe C++ improvement. If you’ve by no means learn powerful C++ and also you imagine you recognize every thing approximately C++, reconsider. ”— Steve Schirripa, software program Engineer, Google “C++ and the C++ neighborhood have grown up within the final fifteen years, and the 3rd variation of potent C++ displays this.

Cocoa Design Patterns

“Next time a few child exhibits up at my door inquiring for a code overview, this can be the e-book that i'm going to throw at him. ”   –Aaron Hillegass, founding father of huge Nerd Ranch, Inc. , and writer of Cocoa Programming for Mac OS X   Unlocking the secrets and techniques of Cocoa and Its Object-Oriented Frameworks   Mac and iPhone builders are frequently crushed by way of the breadth and class of the Cocoa frameworks.

Additional info for Django 1.1 Testing and Debugging

Show sample text content

On account that we will use twill to re-implement the AdminSurveyTest, let's examine what vacationing the Survey upload web page for our try out server produces: kmt@lbox:~$ twill-sh -= Welcome to twill! =current web page: *empty web page* >> cross http://localhost:8000/admin/survey/survey/add/ ==> at http://localhost:8000/admin/survey/survey/add/ present web page: http://localhost:8000/admin/survey/survey/add/ >> showforms shape number 1 ## ## __Name__________________ __Type___ __ID________ __Value____________ 1 username textual content id_username 2 password password id_password three this_is_the_login_form hidden (None) 1 None post (None) Log in four 1 present web page: http://localhost:8000/admin/survey/survey/add/ >> [ one hundred fifty five ] Filling within the Blanks: Integrating Django and different try instruments basically, we did not really get to the survey upload web page. considering that we're not logged in, the server answered with a login web page. we will be able to fill the login shape utilizing the formvalue command: >> formvalue 1 username kmt present web page: http://localhost:8000/admin/survey/survey/add/ >> formvalue 1 password mystery present web page: http://localhost:8000/admin/survey/survey/add/ >> The arguments to formvalue are first the shape quantity, then the sector identify, after which the price we wish to set for that box. when we have stuffed the username and password within the shape, we will put up the shape: >> publish notice: publish is utilizing publish button: name="None", value="Log in" present web page: http://localhost:8000/admin/survey/survey/add/ notice the post command optionally additionally accepts the identify of the post button to exploit. within the case the place there's just one (as here), or if utilizing the 1st put up button at the shape is appropriate, we will be able to easily use post with out argument. Now that we've got logged in, we will use showforms back to determine if we now have relatively retrieved a Survey upload web page: >> showforms shape no 1 ## ## __Name__________________ __Type___ __ID________ __Value____________ 1 identify textual content id_title 2 opens textual content id_opens three closes textual content id_closes four question_set-TOTAL_FORMS hidden id_quest ... four five question_set-INITIAL ... hidden id_quest ... zero 6 question_set-0-id hidden id_quest ... 7 question_set-0-survey hidden id_quest ... eight question_set-0-question textual content id_quest ... nine question_set-1-id hidden id_quest ... 10 question_set-1-survey hidden id_quest ... eleven question_set-1-question textual content id_quest ... [ 156 ] Chapter five 12 question_set-2-id hidden id_quest ... thirteen question_set-2-survey hidden id_quest ... 14 question_set-2-question textual content id_quest ... 15 question_set-3-id hidden id_quest ... sixteen question_set-3-survey hidden id_quest ... 17 question_set-3-question textual content id_quest ... 18 1 _save put up (None) shop 19 2 _addanother one other put up (None) store and upload 20 three _continue modifying publish (None) shop and proceed present web page: http://localhost:8000/admin/survey/survey/add/ >> that appears extra like a Survey upload web page. And certainly, our surroundings of question_setTOTAL_FORMS to zero in our first attempt case is unrealistic, because the server really serves up a kind with that set to four.

Download PDF sample

Rated 4.87 of 5 – based on 8 votes