SlideShare une entreprise Scribd logo
1  sur  71
tagging best practice
     MyBike.JP dev team
e.g.
MyBike.JP
MyBike.JP
MyBike.JP
class Tag(DateTimeModel):
    tag = models.SlugField(u'   ', unique=True, db_index=True)

class TaggedItem(DateTimeModel):
    tag = models.ForeignKey(Tag)
    content_type = models.ForeignKey(ContentType)
    object_id = models.PositiveIntegerField()
    content_object = generic.GenericForeignKey('content_type', 'object_id')
Django ContentTypes
                                 Tag



polymonic                    TaggedItem



                      Bike     Component
bucho
bucho

Bucho
bucho

Bucho

BUCHO
bucho

Bucho

BUCHO
http://mybike.jp/bikes/tag/bucho
http://mybike.jp/bikes/tag/bucho


http://mybike.jp/bikes/tag/Bucho
http://mybike.jp/bikes/tag/bucho


http://mybike.jp/bikes/tag/Bucho


http://mybike.jp/bikes/tag/BUCHO
http://mybike.jp/bikes/tag/bucho


http://mybike.jp/bikes/tag/Bucho


http://mybike.jp/bikes/tag/BUCHO


http://mybike.jp/bikes/tag/
http://mybike.jp/bikes/tag/bucho


http://mybike.jp/bikes/tag/Bucho


http://mybike.jp/bikes/tag/BUCHO


http://mybike.jp/bikes/tag/



→
class Tag(DateTimeModel):
    tag = models.SlugField(u'   ', unique=True, db_index=True)

class TaggedItem(DateTimeModel):
    tag = models.ForeignKey(Tag)
    tag_label = models.CharField(max_length=100)
    content_type = models.ForeignKey(ContentType)
    object_id = models.PositiveIntegerField()
    content_object = generic.GenericForeignKey('content_type', 'object_id')
class Tag(DateTimeModel):
    tag = models.SlugField(u'   ', unique=True, db_index=True)

class TaggedItem(DateTimeModel):
    tag = models.ForeignKey(Tag)
    tag_label = models.CharField(max_length=100)
    content_type = models.ForeignKey(ContentType)
    object_id = models.PositiveIntegerField()
    content_object = generic.GenericForeignKey('content_type', 'object_id')
Tag.tag TaggedItem.tag_label
Tag.tag TaggedItem.tag_label


Tag.tag
Tag.tag TaggedItem.tag_label


Tag.tag
TaggedItem

  bucho

  Bucho

  BUCHO
TaggedItem

  bucho

  Bucho

  BUCHO
TaggedItem

  bucho
             Tag
  Bucho
             bucho
  BUCHO
Good
Good
Good
Good




→
Bad
Bad
Bad
Bad
Bad




→
http://mybike.jp/bikes/tag/
http://mybike.jp/bikes/tag/



                          …
RIESE&MULLER
    (             &                        )




http://mybike.jp/bikes/manufacturer/RIESE&MULLER
http://mybike.jp/bikes/manufacturer/RIESE&MULLER
http://mybike.jp/bikes/manufacturer/RIESE&MULLER
http://mybike.jp/bikes/manufacturer/RIESE&MULLER



             RISE&MULLER
http://mybike.jp/bikes/manufacturer/RIESE&MULLER



             RISE&MULLER
http://mybike.jp/bikes/manufacturer/RIESE&MULLER



             RISE&MULLER



                        …
slug regex → [-w]+
slug regex → [-w]+


reverse()
%26
→URL
%26
→URL


urls.py         &
→
urls.py


(?P<manufacturer_name>[-w]+)
urls.py


(?P<manufacturer_name>[-w]+)




(?P<manufacturer_name>[- &w]+)
templates     iriencode
→<a href=”{{ hoge|iriencode }}”>hoge</a>

urls.py     URL decode
http://mybike.jp

Contenu connexe

En vedette

melssCRM Case Study - Control Electric Company
melssCRM Case Study - Control Electric CompanymelssCRM Case Study - Control Electric Company
melssCRM Case Study - Control Electric CompanymelssCRM
 
[UDIS_6_2nd] Data Journalism_20140712
[UDIS_6_2nd] Data Journalism_20140712[UDIS_6_2nd] Data Journalism_20140712
[UDIS_6_2nd] Data Journalism_20140712Sunghun Bae
 
e2e Projects
e2e Projectse2e Projects
e2e Projectssujite2e
 
e2e Projects
e2e Projectse2e Projects
e2e Projectssujite2e
 
Corporate presentation
Corporate presentationCorporate presentation
Corporate presentationsujite2e
 
Deployment roadmap
Deployment roadmapDeployment roadmap
Deployment roadmapsujite2e
 
Recycling council of bc
Recycling council of bcRecycling council of bc
Recycling council of bcAlex
 
Tracking social media campaigns @ editech
Tracking social media campaigns @ editechTracking social media campaigns @ editech
Tracking social media campaigns @ editechRobot Media
 

En vedette (8)

melssCRM Case Study - Control Electric Company
melssCRM Case Study - Control Electric CompanymelssCRM Case Study - Control Electric Company
melssCRM Case Study - Control Electric Company
 
[UDIS_6_2nd] Data Journalism_20140712
[UDIS_6_2nd] Data Journalism_20140712[UDIS_6_2nd] Data Journalism_20140712
[UDIS_6_2nd] Data Journalism_20140712
 
e2e Projects
e2e Projectse2e Projects
e2e Projects
 
e2e Projects
e2e Projectse2e Projects
e2e Projects
 
Corporate presentation
Corporate presentationCorporate presentation
Corporate presentation
 
Deployment roadmap
Deployment roadmapDeployment roadmap
Deployment roadmap
 
Recycling council of bc
Recycling council of bcRecycling council of bc
Recycling council of bc
 
Tracking social media campaigns @ editech
Tracking social media campaigns @ editechTracking social media campaigns @ editech
Tracking social media campaigns @ editech
 

Plus de Mitsukuni Sato

geohexで作るロケーションヒートマップ
geohexで作るロケーションヒートマップgeohexで作るロケーションヒートマップ
geohexで作るロケーションヒートマップMitsukuni Sato
 
BPStudy #45 自転車 de ダイエット
BPStudy #45 自転車 de ダイエットBPStudy #45 自転車 de ダイエット
BPStudy #45 自転車 de ダイエットMitsukuni Sato
 
Bpstudy44 Rikuzentakata
Bpstudy44 RikuzentakataBpstudy44 Rikuzentakata
Bpstudy44 RikuzentakataMitsukuni Sato
 
BPStudy #42 MongoDB and MyBike.JP and Me
BPStudy #42  MongoDB and MyBike.JP and MeBPStudy #42  MongoDB and MyBike.JP and Me
BPStudy #42 MongoDB and MyBike.JP and MeMitsukuni Sato
 
ガラケーの識別子
ガラケーの識別子ガラケーの識別子
ガラケーの識別子Mitsukuni Sato
 

Plus de Mitsukuni Sato (6)

geohexで作るロケーションヒートマップ
geohexで作るロケーションヒートマップgeohexで作るロケーションヒートマップ
geohexで作るロケーションヒートマップ
 
BPStudy #45 自転車 de ダイエット
BPStudy #45 自転車 de ダイエットBPStudy #45 自転車 de ダイエット
BPStudy #45 自転車 de ダイエット
 
Bpstudy44 Rikuzentakata
Bpstudy44 RikuzentakataBpstudy44 Rikuzentakata
Bpstudy44 Rikuzentakata
 
BPStudy #42 MongoDB and MyBike.JP and Me
BPStudy #42  MongoDB and MyBike.JP and MeBPStudy #42  MongoDB and MyBike.JP and Me
BPStudy #42 MongoDB and MyBike.JP and Me
 
ガラケーの識別子
ガラケーの識別子ガラケーの識別子
ガラケーの識別子
 
負荷分散の話
負荷分散の話負荷分散の話
負荷分散の話
 

Dernier

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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 AutomationSafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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...Principled Technologies
 
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...apidays
 
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...DianaGray10
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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 2024Rafal Los
 

Dernier (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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...
 
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...
 
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...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 

Tagging architecture on MyBike.JP

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n