SlideShare une entreprise Scribd logo
1  sur  150
Django AUTHORS   Python   Google   3
7                10


    Django   5
Django
PHP   Python
2003
Ruby on Rails
2005
World Online often has only
a matter of hours to take a complicated
Web application from concept to public launch.
…
…
…
DB
URL
DB
URL
DB
URL
DB
URL
DB
URL
DB
URL
85%
http://www2.ljworld.com/




LJWorld   …
http://www2.ljworld.com/
                     2005
Django          Adrian
http://www2.ljworld.com/
                     2005
Django          Adrian
http://www2.ljworld.com/
                     2005
Django          Adrian
http://www2.ljworld.com/
                     2005
Django          Adrian
http://www2.ljworld.com/
                     2005
Django          Adrian
…   …
27.6
django-admin.py startproject startapp


                                        manage.py
4       settings.py


    4
4       settings.py


    4
4       settings.py


    4
settings.py   INSTALLED_APPS
5                        Web




    blog                                  blog
settings.py   INSTALLED_APPS
5                        Web




    blog                                  blog
10                                           manage.py shell             blog
                                  startapp            gumistudy.blog   blog


manage.py           ./manage.py                          PYTHONPATH             Python Shell
            gumistudy.blog
                                                          manage.py
                    PYTHONPATH                 blog
…
Django
Django
admindoc
              Django
       view
                       Django BIDI
RegexValidator
        ■    URLValidator
        ■    validate_email
        ■    validate_slug
        ■    validate_ipv4_address
        ■    validate_comma_separated_integer_list
        ■    MaxValueValidator
        ■    MinValueValidator
        ■    MaxLengthValidator
        ■    MinLengthValidator

                                                     Model
validators                                                   validator
  …
ValidationError raise
                        DRY
CharField Integer
validators               RegexValidator                                 validator
             CharField           SlugField                       Slug               URL
                                DB
models
models.py
models
models.py
…
models   import   models
                       meta       app_label
…
models   import   models
                       meta       app_label
…


                        Entry       django.contrib.auth          User
       Entry   auhtor                     User     Entry
User              entry_set
                                                          User
…


                        Entry       django.contrib.auth          User
       Entry   auhtor                     User     Entry
User              entry_set
                                                          User
django.contrib.auth
                                      django.contrib.contenttypes
ContentType                         django.contrib.auth
django.contrib.auth
                                      django.contrib.contenttypes
ContentType                         django.contrib.auth
memcached
Signal
Signal
                  send
Signal
Signal
                  send
Signal
Signal
                  send
send    sender args


                        connect
          sender args
connect                      sender
send    sender args


                        connect
          sender args
connect                      sender
send    sender args


                        connect
          sender args
connect                      sender
…
Python
Python
Python
Abstract   syncdb
…   Proxy
…   Proxy
O/R Mapper    SQL


O/R Mapper           SQL         SQL
objects
              filter exclude       all
…                             …         all   filter
                              …
objects
              filter exclude       all
…                             …         all   filter
                              …
objects
              filter exclude       all
…                             …         all   filter
                              …
objects
              filter exclude       all
…                             …         all   filter
                              …
F Aggregation
F


        Aggregation             aggregate annotate       aggregate
    annotate                                         Aggregate Annotate
          Queryset
F Aggregation
F


        Aggregation             aggregate annotate       aggregate
    annotate                                         Aggregate Annotate
          Queryset
F Aggregation
F


        Aggregation             aggregate annotate       aggregate
    annotate                                         Aggregate Annotate
          Queryset
DRY
           Queryset               get_query_set


               Entry         public_objects pub_date       Queryset


objects   Manager                                 Django
                         Django
DRY
           Queryset               get_query_set


               Entry         public_objects pub_date       Queryset


objects   Manager                                 Django
                         Django
Django
         Django
Django
         Django
using   using   default
using   using   default
Django                                    DatabaseRouters
DatabaseRouters                                               syncdb


    None          None   Django   DatabaseRouter
default
Django
Django            django.contrib
1:30   )




           bitbucket
1:30   )




           bitbucket
ModelAdmin
   Queryset          Queryset   bulk update
save
ModelAdmin
   Queryset          Queryset   bulk update
save
Django
Django   Ellington   CMS
                                    admin
settings.py            TEMPLATE_LOADERS                 TEMPLATE_DIRS
TEMPLATE_LOADERS       filesystem.Loader app_directories.Loader              TEMPLATE_DIRS
                                                                      TEMPLATE_DIRS
       app_directories.Loader
settings.py            TEMPLATE_LOADERS                 TEMPLATE_DIRS
TEMPLATE_LOADERS       filesystem.Loader app_directories.Loader              TEMPLATE_DIRS
                                                                      TEMPLATE_DIRS
       app_directories.Loader
app_directories.Loader
                     Django                               templates
                                 app_directories.Loader
                     templates
app_directories.Loader
                     Django                               templates
                                 app_directories.Loader
                     templates
app_directories.Loader
                     Django                               templates
                                 app_directories.Loader
                     templates
filesystem.Loader TEMPLATE_DIRS


                             templates
                                         TEMPLATE_DIRS
filesystem.Loader TEMPLATE_DIRS


                             templates
                                         TEMPLATE_DIRS
Django   Django
2
admin/site_base.html                   …
  app_directory.Loader   filesystem.Loader
admin/site_base.html                   …
  app_directory.Loader   filesystem.Loader
! <html>
!!! <head>{% block title %}              {% endblock title %}</head>
    <script type="text/javascript" src="common.js"></script>
    {% block custom_js %}{% endblock custom_js %}
!!! <body>
!!! <div id="menu">{% block menu %}{% endblock menu %}</div>
!!! <div id="content">{% block content %}{% endblock content %}</div>
    <div id=”copyright”>{% block copyright %}everes{% endblock %}</div>
!!! </body>
! </html>




! {% extends 'base.html% %}
! {% block title %}{{ block.super }}            {% endblock title %}
! {% block menu %}                      {% endblock menu %}




! {% extends 'app/base.html' %}
! {% block content %}                  {% endblock content %}
! <html>
!!! <head>{% block title %}              {% endblock title %}</head>
    <script type="text/javascript" src="common.js"></script>
    {% block custom_js %}{% endblock custom_js %}
!!! <body>
!!! <div id="menu">{% block menu %}{% endblock menu %}</div>
!!! <div id="content">{% block content %}{% endblock content %}</div>
    <div id=”copyright”>{% block copyright %}everes{% endblock %}</div>
!!! </body>
! </html>




! {% extends 'base.html% %}
! {% block title %}{{ block.super }}            {% endblock title %}
! {% block menu %}                      {% endblock menu %}




! {% extends 'app/base.html' %}
! {% block content %}                  {% endblock content %}
! <html>
!!! <head>{% block title %}              {% endblock title %}</head>
    <script type="text/javascript" src="common.js"></script>
    {% block custom_js %}{% endblock custom_js %}
!!! <body>
!!! <div id="menu">{% block menu %}{% endblock menu %}</div>
!!! <div id="content">{% block content %}{% endblock content %}</div>
    <div id=”copyright”>{% block copyright %}everes{% endblock %}</div>
!!! </body>
! </html>




! {% extends 'base.html% %}
! {% block title %}{{ block.super }}            {% endblock title %}
! {% block menu %}                      {% endblock menu %}




! {% extends 'app/base.html' %}
! {% block content %}                  {% endblock content %}
! <html>
!!! <head>{% block title %}              {% endblock title %}</head>
    <script type="text/javascript" src="common.js"></script>
    {% block custom_js %}{% endblock custom_js %}
!!! <body>
!!! <div id="menu">{% block menu %}{% endblock menu %}</div>
!!! <div id="content">{% block content %}{% endblock content %}</div>
    <div id=”copyright”>{% block copyright %}everes{% endblock %}</div>
!!! </body>
! </html>




! {% extends 'base.html% %}
! {% block title %}{{ block.super }}            {% endblock title %}
! {% block menu %}                      {% endblock menu %}




! {% extends 'app/base.html' %}
! {% block content %}                  {% endblock content %}
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3
Django - 次の一歩 gumiStudy#3

Contenu connexe

Tendances

Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2
nottings
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
Yehuda Katz
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
Yehuda Katz
 
Intro To Moose
Intro To MooseIntro To Moose
Intro To Moose
cPanel
 

Tendances (20)

Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019
 
Django Heresies
Django HeresiesDjango Heresies
Django Heresies
 
Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019
 
Assetic (Zendcon)
Assetic (Zendcon)Assetic (Zendcon)
Assetic (Zendcon)
 
Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2
 
Introducing Assetic: Asset Management for PHP 5.3
Introducing Assetic: Asset Management for PHP 5.3Introducing Assetic: Asset Management for PHP 5.3
Introducing Assetic: Asset Management for PHP 5.3
 
With a Mighty Hammer
With a Mighty HammerWith a Mighty Hammer
With a Mighty Hammer
 
WCLV13 JavaScript
WCLV13 JavaScriptWCLV13 JavaScript
WCLV13 JavaScript
 
Hooks WCSD12
Hooks WCSD12Hooks WCSD12
Hooks WCSD12
 
Doctrine MongoDB ODM (PDXPHP)
Doctrine MongoDB ODM (PDXPHP)Doctrine MongoDB ODM (PDXPHP)
Doctrine MongoDB ODM (PDXPHP)
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
 
A Little Backbone For Your App
A Little Backbone For Your AppA Little Backbone For Your App
A Little Backbone For Your App
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
Maintainable JavaScript 2012
Maintainable JavaScript 2012Maintainable JavaScript 2012
Maintainable JavaScript 2012
 
Django REST Framework
Django REST FrameworkDjango REST Framework
Django REST Framework
 
Spring data iii
Spring data iiiSpring data iii
Spring data iii
 
Intro To Moose
Intro To MooseIntro To Moose
Intro To Moose
 
Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019
 
OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010
 

En vedette (8)

引き出しとしてのDjango - SoozyCon7
引き出しとしてのDjango - SoozyCon7引き出しとしてのDjango - SoozyCon7
引き出しとしてのDjango - SoozyCon7
 
変態的PHPフレームワーク rhaco
変態的PHPフレームワーク rhaco変態的PHPフレームワーク rhaco
変態的PHPフレームワーク rhaco
 
Not free
Not freeNot free
Not free
 
Testman
TestmanTestman
Testman
 
Python Workshop the Edge - django
Python Workshop the Edge - djangoPython Workshop the Edge - django
Python Workshop the Edge - django
 
Webフレームワークパネル(Django) at PyConJP 2012
Webフレームワークパネル(Django) at PyConJP 2012Webフレームワークパネル(Django) at PyConJP 2012
Webフレームワークパネル(Django) at PyConJP 2012
 
Erulolo at Kamakurago #1
Erulolo at Kamakurago #1Erulolo at Kamakurago #1
Erulolo at Kamakurago #1
 
伝説のギタリストじゃない方のDjango
伝説のギタリストじゃない方のDjango伝説のギタリストじゃない方のDjango
伝説のギタリストじゃない方のDjango
 

Similaire à Django - 次の一歩 gumiStudy#3

Jopr Plugin Development
Jopr Plugin DevelopmentJopr Plugin Development
Jopr Plugin Development
SEA Tecnologia
 
Testing of javacript
Testing of javacriptTesting of javacript
Testing of javacript
Lei Kang
 
Whoops! where did my architecture go?
Whoops! where did my architecture go?Whoops! where did my architecture go?
Whoops! where did my architecture go?
Oliver Gierke
 

Similaire à Django - 次の一歩 gumiStudy#3 (20)

Startup Camp - Git, Python, Django session
Startup Camp - Git, Python, Django sessionStartup Camp - Git, Python, Django session
Startup Camp - Git, Python, Django session
 
JavaOne 2009 BOF-5189 Griffon In Depth
JavaOne 2009 BOF-5189 Griffon In DepthJavaOne 2009 BOF-5189 Griffon In Depth
JavaOne 2009 BOF-5189 Griffon In Depth
 
django
djangodjango
django
 
Python在豆瓣的应用
Python在豆瓣的应用Python在豆瓣的应用
Python在豆瓣的应用
 
Django by rj
Django by rjDjango by rj
Django by rj
 
Angular Intermediate
Angular IntermediateAngular Intermediate
Angular Intermediate
 
Freeing the cloud, one service at a time
Freeing the cloud, one service at a timeFreeing the cloud, one service at a time
Freeing the cloud, one service at a time
 
Reusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de ZopeReusando componentes Zope fuera de Zope
Reusando componentes Zope fuera de Zope
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrap
 
Jopr Plugin Development
Jopr Plugin DevelopmentJopr Plugin Development
Jopr Plugin Development
 
Refactoring a go project
Refactoring a go projectRefactoring a go project
Refactoring a go project
 
Django
DjangoDjango
Django
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manor
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
 
Testing of javacript
Testing of javacriptTesting of javacript
Testing of javacript
 
Whoops! where did my architecture go?
Whoops! where did my architecture go?Whoops! where did my architecture go?
Whoops! where did my architecture go?
 
Python Developer Certification
Python Developer CertificationPython Developer Certification
Python Developer Certification
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Django - 次の一歩 gumiStudy#3

  • 1.
  • 2.
  • 3. Django AUTHORS Python Google 3
  • 4. 7 10 Django 5
  • 6. PHP Python
  • 10. World Online often has only a matter of hours to take a complicated Web application from concept to public launch.
  • 11.
  • 12.
  • 13.
  • 20. 85%
  • 22. http://www2.ljworld.com/ 2005 Django Adrian
  • 23. http://www2.ljworld.com/ 2005 Django Adrian
  • 24. http://www2.ljworld.com/ 2005 Django Adrian
  • 25. http://www2.ljworld.com/ 2005 Django Adrian
  • 26. http://www2.ljworld.com/ 2005 Django Adrian
  • 27.
  • 28.
  • 30. 4 settings.py 4
  • 31. 4 settings.py 4
  • 32. 4 settings.py 4
  • 33. settings.py INSTALLED_APPS 5 Web blog blog
  • 34. settings.py INSTALLED_APPS 5 Web blog blog
  • 35. 10 manage.py shell blog startapp gumistudy.blog blog manage.py ./manage.py PYTHONPATH Python Shell gumistudy.blog manage.py PYTHONPATH blog
  • 36.
  • 39.
  • 40. admindoc Django view Django BIDI
  • 41.
  • 42. RegexValidator ■ URLValidator ■ validate_email ■ validate_slug ■ validate_ipv4_address ■ validate_comma_separated_integer_list ■ MaxValueValidator ■ MinValueValidator ■ MaxLengthValidator ■ MinLengthValidator Model validators validator …
  • 44. CharField Integer validators RegexValidator validator CharField SlugField Slug URL DB
  • 45.
  • 46.
  • 49. … models import models meta app_label
  • 50. … models import models meta app_label
  • 51.
  • 52. Entry django.contrib.auth User Entry auhtor User Entry User entry_set User
  • 53. Entry django.contrib.auth User Entry auhtor User Entry User entry_set User
  • 54. django.contrib.auth django.contrib.contenttypes ContentType django.contrib.auth
  • 55. django.contrib.auth django.contrib.contenttypes ContentType django.contrib.auth
  • 60. send sender args connect sender args connect sender
  • 61. send sender args connect sender args connect sender
  • 62. send sender args connect sender args connect sender
  • 63.
  • 67. Abstract syncdb
  • 68. Proxy
  • 69. Proxy
  • 70. O/R Mapper SQL O/R Mapper SQL SQL
  • 71. objects filter exclude all … … all filter …
  • 72. objects filter exclude all … … all filter …
  • 73. objects filter exclude all … … all filter …
  • 74. objects filter exclude all … … all filter …
  • 75. F Aggregation F Aggregation aggregate annotate aggregate annotate Aggregate Annotate Queryset
  • 76. F Aggregation F Aggregation aggregate annotate aggregate annotate Aggregate Annotate Queryset
  • 77. F Aggregation F Aggregation aggregate annotate aggregate annotate Aggregate Annotate Queryset
  • 78. DRY Queryset get_query_set Entry public_objects pub_date Queryset objects Manager Django Django
  • 79. DRY Queryset get_query_set Entry public_objects pub_date Queryset objects Manager Django Django
  • 80. Django Django
  • 81. Django Django
  • 82. using using default
  • 83. using using default
  • 84. Django DatabaseRouters DatabaseRouters syncdb None None Django DatabaseRouter default
  • 85. Django Django django.contrib
  • 86. 1:30 ) bitbucket
  • 87. 1:30 ) bitbucket
  • 88. ModelAdmin Queryset Queryset bulk update save
  • 89. ModelAdmin Queryset Queryset bulk update save
  • 90. Django Django Ellington CMS admin
  • 91. settings.py TEMPLATE_LOADERS TEMPLATE_DIRS TEMPLATE_LOADERS filesystem.Loader app_directories.Loader TEMPLATE_DIRS TEMPLATE_DIRS app_directories.Loader
  • 92. settings.py TEMPLATE_LOADERS TEMPLATE_DIRS TEMPLATE_LOADERS filesystem.Loader app_directories.Loader TEMPLATE_DIRS TEMPLATE_DIRS app_directories.Loader
  • 93. app_directories.Loader Django templates app_directories.Loader templates
  • 94. app_directories.Loader Django templates app_directories.Loader templates
  • 95. app_directories.Loader Django templates app_directories.Loader templates
  • 96. filesystem.Loader TEMPLATE_DIRS templates TEMPLATE_DIRS
  • 97. filesystem.Loader TEMPLATE_DIRS templates TEMPLATE_DIRS
  • 98. Django Django 2
  • 99. admin/site_base.html … app_directory.Loader filesystem.Loader
  • 100. admin/site_base.html … app_directory.Loader filesystem.Loader
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 116.
  • 117.
  • 118.
  • 119. ! <html> !!! <head>{% block title %} {% endblock title %}</head> <script type="text/javascript" src="common.js"></script> {% block custom_js %}{% endblock custom_js %} !!! <body> !!! <div id="menu">{% block menu %}{% endblock menu %}</div> !!! <div id="content">{% block content %}{% endblock content %}</div> <div id=”copyright”>{% block copyright %}everes{% endblock %}</div> !!! </body> ! </html> ! {% extends 'base.html% %} ! {% block title %}{{ block.super }} {% endblock title %} ! {% block menu %} {% endblock menu %} ! {% extends 'app/base.html' %} ! {% block content %} {% endblock content %}
  • 120. ! <html> !!! <head>{% block title %} {% endblock title %}</head> <script type="text/javascript" src="common.js"></script> {% block custom_js %}{% endblock custom_js %} !!! <body> !!! <div id="menu">{% block menu %}{% endblock menu %}</div> !!! <div id="content">{% block content %}{% endblock content %}</div> <div id=”copyright”>{% block copyright %}everes{% endblock %}</div> !!! </body> ! </html> ! {% extends 'base.html% %} ! {% block title %}{{ block.super }} {% endblock title %} ! {% block menu %} {% endblock menu %} ! {% extends 'app/base.html' %} ! {% block content %} {% endblock content %}
  • 121. ! <html> !!! <head>{% block title %} {% endblock title %}</head> <script type="text/javascript" src="common.js"></script> {% block custom_js %}{% endblock custom_js %} !!! <body> !!! <div id="menu">{% block menu %}{% endblock menu %}</div> !!! <div id="content">{% block content %}{% endblock content %}</div> <div id=”copyright”>{% block copyright %}everes{% endblock %}</div> !!! </body> ! </html> ! {% extends 'base.html% %} ! {% block title %}{{ block.super }} {% endblock title %} ! {% block menu %} {% endblock menu %} ! {% extends 'app/base.html' %} ! {% block content %} {% endblock content %}
  • 122. ! <html> !!! <head>{% block title %} {% endblock title %}</head> <script type="text/javascript" src="common.js"></script> {% block custom_js %}{% endblock custom_js %} !!! <body> !!! <div id="menu">{% block menu %}{% endblock menu %}</div> !!! <div id="content">{% block content %}{% endblock content %}</div> <div id=”copyright”>{% block copyright %}everes{% endblock %}</div> !!! </body> ! </html> ! {% extends 'base.html% %} ! {% block title %}{{ block.super }} {% endblock title %} ! {% block menu %} {% endblock menu %} ! {% extends 'app/base.html' %} ! {% block content %} {% endblock content %}