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

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

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

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Best practices for tagging content in Django

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