SlideShare a Scribd company logo
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

More Related Content

Viewers also liked

melssCRM Case Study - Control Electric Company
melssCRM Case Study - Control Electric CompanymelssCRM Case Study - Control Electric Company
melssCRM Case Study - Control Electric Company
melssCRM
 
[UDIS_6_2nd] Data Journalism_20140712
[UDIS_6_2nd] Data Journalism_20140712[UDIS_6_2nd] Data Journalism_20140712
[UDIS_6_2nd] Data Journalism_20140712
Sunghun 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
 

Viewers also liked (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
 

More from 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
 

More from 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
 
ガラケーの識別子
ガラケーの識別子ガラケーの識別子
ガラケーの識別子
 
負荷分散の話
負荷分散の話負荷分散の話
負荷分散の話
 

Recently uploaded

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 

Recently uploaded (20)

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 

Tagging architecture on MyBike.JP

Editor's Notes

  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