This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from myapp.forms import MyForm | |
def my_view(request): | |
form = MyForm(request.POST or None) | |
if form.is_valid(): | |
name = form.cleaned_data['name'] | |
email = form.cleaned_data['email'] | |
# do something great with that data | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
This test module will run setUp and tearDown only *once* for all test cases in this module. | |
This is very convenient for users who want to just test multiple urls whether they are reachable and respond with the correct http response code. | |
""" | |
import logging | |
log = logging.getLogger(__name__) | |
from os import path |