Tornado 4.5 Documentation
Tornado web application is done in subclasses of RequestHandler. The main entry point for a handler subclass is a method named after the HTTP method being handled: get(), post(), etc. Each handler may define define a BaseHandler class that overrides methods such as write_error and get_current_user and then subclass your own BaseHandler instead of RequestHandler for all your specific handlers. Handling request different template paths for different handlers). To load templates from a non-filesystem location, subclass tornado.template.BaseLoader and pass an instance as the template_loader application setting. Compiled0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 5.1 Documentation
Tornado web application is done in subclasses of RequestHandler. The main entry point for a handler subclass is a method named after the HTTP method being handled: get(), post(), etc. Each handler may define define a BaseHandler class that overrides methods such as write_error and get_current_user and then subclass your own BaseHandler instead of RequestHandler for all your specific handlers. Handling request different template paths for different handlers). To load templates from a non-filesystem location, subclass tornado.template.BaseLoader and pass an instance as the template_loader application setting. Compiled0 码力 | 359 页 | 347.32 KB | 1 年前3
Django 4.2.x DocumentationHow to create custom model fields Introduction Background theory Writing a field subclass Writing a FileField subclass How to write custom lookups A lookup example A transformer example Writing an efficient assertIs(future_question.was_published_recently(), False) Here we have created a django.test.TestCase subclass with a method that creates a Question instance with a pub_date in the future. We then check the What happened is this: manage.py test polls looked for tests in the polls application it found a subclass of the django.test.TestCase class it created a special database for the purpose of testing it0 码力 | 3305 页 | 3.16 MB | 1 年前3
Django 4.1.x DocumentationHow to create custom model fields Introduction Background theory Writing a field subclass Writing a FileField subclass How to write custom lookups A lookup example A transformer example Writing an efficient assertIs(future_question.was_published_recently(), False) Here we have created a django.test.TestCase subclass with a method that creates a Question instance with a pub_date in the future. We then check the What happened is this: manage.py test polls looked for tests in the polls application it found a subclass of the django.test.TestCase class it created a special database for the purpose of testing it0 码力 | 3240 页 | 3.13 MB | 1 年前3
Django 2.2.x Documentationobjects Writing custom model fields Introduction Background theory Writing a field subclass Writing a FileField subclass Custom Lookups A simple lookup example A simple transformer example Writing an assertIs(future_question.was_published_recently(), False) Here we have created a django.test.TestCase subclass with a method that creates a Question instance with a pub_date in the future. We then check the What happened is this: manage.py test polls looked for tests in the polls application it found a subclass of the django.test.TestCase class it created a special database for the purpose of testing it0 码力 | 2915 页 | 2.83 MB | 1 年前3
Django 2.1.x Documentationobjects Writing custom model fields Introduction Background theory Writing a field subclass Writing a FileField subclass Custom Lookups A simple lookup example A simple transformer example Writing an efficient assertIs(future_question.was_published_recently(), False) Here we have created a django.test.TestCase subclass with a method that creates a Question instance with a pub_date in the future. We then check the What happened is this: manage.py test polls looked for tests in the polls application it found a subclass of the django.test.TestCase class it created a special database for the purpose of testing it0 码力 | 2790 页 | 2.71 MB | 1 年前3
Django 2.0.x Documentationobjects Writing custom model fields Introduction Background theory Writing a field subclass Writing a FileField subclass Custom Lookups A simple lookup example A simple transformer example Writing an efficient tion.was_published_recently(), False) What we have done here is created a django.test.TestCase subclass with a method that creates a Question instance with a pub_date in the future. We then check the happened is this: python manage.py test polls looked for tests in the polls application it found a subclass of the django.test.TestCase class it created a special database for the purpose of testing it0 码力 | 2746 页 | 2.67 MB | 1 年前3
Django 4.0.x DocumentationHow to create custom model fields Introduction Background theory Writing a field subclass Writing a FileField subclass How to write custom lookups A lookup example A transformer example Writing an efficient assertIs(future_question.was_published_recently(), False) Here we have created a django.test.TestCase subclass with a method that creates a Question instance with a pub_date in the future. We then check the What happened is this: manage.py test polls looked for tests in the polls application it found a subclass of the django.test.TestCase class it created a special database for the purpose of testing it0 码力 | 3184 页 | 3.14 MB | 1 年前3
Django 3.2.x Documentationobjects Writing custom model fields Introduction Background theory Writing a field subclass Writing a FileField subclass Custom Lookups A lookup example A transformer example Writing an efficient abs__lt assertIs(future_question.was_published_recently(), False) Here we have created a django.test.TestCase subclass with a method that creates a Question instance with a pub_date in the future. We then check the What happened is this: manage.py test polls looked for tests in the polls application it found a subclass of the django.test.TestCase class it created a special database for the purpose of testing it0 码力 | 3121 页 | 3.08 MB | 1 年前3
Django 1.11.x Documentationobjects Writing custom model fields Introduction Background theory Writing a field subclass Writing a FileField subclass Custom Lookups A simple lookup example A simple transformer example Writing an efficient tion.was_published_recently(), False) What we have done here is created a django.test.TestCase subclass with a method that creates a Question instance with a pub_date in the future. We then check the happened is this: python manage.py test polls looked for tests in the polls application it found a subclass of the django.test.TestCase class it created a special database for the purpose of testing it0 码力 | 2747 页 | 2.67 MB | 1 年前3
共 364 条
- 1
- 2
- 3
- 4
- 5
- 6
- 37













