gumiStudy#3 Django – 次の一歩
Upcoming SlideShare
Loading in...5
×
 

gumiStudy#3 Django – 次の一歩

on

  • 1,343 views

Djangoの出自からDjangoの仕組みについて理解を深めます。

Djangoの出自からDjangoの仕組みについて理解を深めます。
アプリケーション設計のための第一歩です。

Statistics

Views

Total Views
1,343
Views on SlideShare
1,343
Embed Views
0

Actions

Likes
1
Downloads
9
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

gumiStudy#3 Django – 次の一歩 Presentation Transcript

  • 1. Django AUTHORS Python Google 3
  • 2. 7 10 Django 5
  • 3. Django
  • 4. PHP Python
  • 5. 2003
  • 6. Ruby on Rails
  • 7. 2005
  • 8. World Online often has only a matter of hours to take a complicated Web application from concept to public launch.
  • 9. …
  • 10. …
  • 11. …
  • 12. DB URL
  • 13. DB URL
  • 14. DB URL
  • 15. DB URL
  • 16. DB URL
  • 17. DB URL
  • 18. 85%
  • 19. http://www2.ljworld.com/ LJWorld …
  • 20. http://www2.ljworld.com/ 2005 Django Adrian
  • 21. http://www2.ljworld.com/ 2005 Django Adrian
  • 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. … …
  • 26. 27.6 django-admin.py startproject startapp manage.py
  • 27. 4 settings.py 4
  • 28. 4 settings.py 4
  • 29. 4 settings.py 4
  • 30. settings.py INSTALLED_APPS 5 Web blog blog
  • 31. settings.py INSTALLED_APPS 5 Web blog blog
  • 32. 10 manage.py shell blog startapp gumistudy.blog blog manage.py ./manage.py PYTHONPATH Python Shell gumistudy.blog manage.py PYTHONPATH blog
  • 33. …
  • 34. Django
  • 35. Django
  • 36. admindoc Django view Django BIDI
  • 37. RegexValidator ■ URLValidator ■ validate_email ■ validate_slug ■ validate_ipv4_address ■ validate_comma_separated_integer_list ■ MaxValueValidator ■ MinValueValidator ■ MaxLengthValidator ■ MinLengthValidator Model validators validator …
  • 38. ValidationError raise DRY
  • 39. CharField Integer validators RegexValidator validator CharField SlugField Slug URL DB
  • 40. models models.py
  • 41. models models.py
  • 42. … models import models meta app_label
  • 43. … models import models meta app_label
  • 44. … Entry django.contrib.auth User Entry auhtor User Entry User entry_set User
  • 45. … Entry django.contrib.auth User Entry auhtor User Entry User entry_set User
  • 46. django.contrib.auth django.contrib.contenttypes ContentType django.contrib.auth
  • 47. django.contrib.auth django.contrib.contenttypes ContentType django.contrib.auth
  • 48. memcached
  • 49. Signal Signal send
  • 50. Signal Signal send
  • 51. Signal Signal send
  • 52. send sender args connect sender args connect sender
  • 53. send sender args connect sender args connect sender
  • 54. send sender args connect sender args connect sender
  • 55. …
  • 56. Python
  • 57. Python
  • 58. Python
  • 59. Abstract syncdb
  • 60. … Proxy
  • 61. … Proxy
  • 62. O/R Mapper SQL O/R Mapper SQL SQL
  • 63. objects filter exclude all … … all filter …
  • 64. objects filter exclude all … … all filter …
  • 65. objects filter exclude all … … all filter …
  • 66. objects filter exclude all … … all filter …
  • 67. F Aggregation F Aggregation aggregate annotate aggregate annotate Aggregate Annotate Queryset
  • 68. F Aggregation F Aggregation aggregate annotate aggregate annotate Aggregate Annotate Queryset
  • 69. F Aggregation F Aggregation aggregate annotate aggregate annotate Aggregate Annotate Queryset
  • 70. DRY Queryset get_query_set Entry public_objects pub_date Queryset objects Manager Django Django
  • 71. DRY Queryset get_query_set Entry public_objects pub_date Queryset objects Manager Django Django
  • 72. Django Django
  • 73. Django Django
  • 74. using using default
  • 75. using using default
  • 76. Django DatabaseRouters DatabaseRouters syncdb None None Django DatabaseRouter default
  • 77. Django Django django.contrib
  • 78. 1:30 ) bitbucket
  • 79. 1:30 ) bitbucket
  • 80. ModelAdmin Queryset Queryset bulk update save
  • 81. ModelAdmin Queryset Queryset bulk update save
  • 82. Django Django Ellington CMS admin
  • 83. settings.py TEMPLATE_LOADERS TEMPLATE_DIRS TEMPLATE_LOADERS filesystem.Loader app_directories.Loader TEMPLATE_DIRS TEMPLATE_DIRS app_directories.Loader
  • 84. settings.py TEMPLATE_LOADERS TEMPLATE_DIRS TEMPLATE_LOADERS filesystem.Loader app_directories.Loader TEMPLATE_DIRS TEMPLATE_DIRS app_directories.Loader
  • 85. app_directories.Loader Django templates app_directories.Loader templates
  • 86. app_directories.Loader Django templates app_directories.Loader templates
  • 87. app_directories.Loader Django templates app_directories.Loader templates
  • 88. filesystem.Loader TEMPLATE_DIRS templates TEMPLATE_DIRS
  • 89. filesystem.Loader TEMPLATE_DIRS templates TEMPLATE_DIRS
  • 90. Django Django 2
  • 91. admin/site_base.html … app_directory.Loader filesystem.Loader
  • 92. admin/site_base.html … app_directory.Loader filesystem.Loader
  • 93. ! <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 %}
  • 94. ! <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 %}
  • 95. ! <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 %}
  • 96. ! <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 %}