test.SimpleTestCase.assertTemplateUsed()
  • References/Python/Django/Guides

SimpleTestCase.assertTemplateUsed(response, template_name, msg_prefix='', count=None) [source] Asserts

2025-01-10 15:47:30
test.runner.DiscoverRunner.test_loader
  • References/Python/Django/Guides

DiscoverRunner.test_loader This is the class that loads tests, whether from TestCases or modules or otherwise and bundles them

2025-01-10 15:47:30
auth.models.AbstractBaseUser.set_password()
  • References/Python/Django/Guides

set_password(raw_password) Sets the user’s password to the given raw string, taking care of the password hashing. Doesn’t save

2025-01-10 15:47:30
auth.models.BaseUserManager.get_by_natural_key()
  • References/Python/Django/Guides

get_by_natural_key(username) Retrieves a user instance using the contents of the field nominated by USERNAME_FIELD

2025-01-10 15:47:30
auth.hashers.check_password()
  • References/Python/Django/Guides

check_password(password, encoded) [source] If you’d like to manually authenticate a user

2025-01-10 15:47:30
test.TransactionTestCase.assertNumQueries()
  • References/Python/Django/Guides

TransactionTestCase.assertNumQueries(num, func, *args, **kwargs) [source] Asserts that when

2025-01-10 15:47:30
test.runner.DiscoverRunner.test_suite
  • References/Python/Django/Guides

DiscoverRunner.test_suite The class used to build the test suite. By default it is set to unittest.TestSuite. This

2025-01-10 15:47:30
test.TransactionTestCase
  • References/Python/Django/Guides

class TransactionTestCase [source] TransactionTestCase inherits from

2025-01-10 15:47:30
Porting to Python 3
  • References/Python/Django/Guides

Django 1.5 is the first version of Django to support Python 3. The same code runs both on Python 2 (≥ 2.6.5) and Python 3 (≥ 3.2), thanks to the

2025-01-10 15:47:30
Models
  • References/Python/Django/Guides

A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the data you’re storing. Generally, each model maps

2025-01-10 15:47:30