django-smart-slak

Een SMART SLUG-veld voor uw modellen
Download nu

django-smart-slak Rangschikking & Samenvatting

Advertentie

  • Rating:
  • Vergunning:
  • MIT/X Consortium Lic...
  • Prijs:
  • FREE
  • Naam uitgever:
  • Charles Leifer
  • Uitgever website:
  • http://www.charlesleifer.com/blog/

django-smart-slak Tags


django-smart-slak Beschrijving

Een slim slakveld voor uw modellen Django-Smart-Slug is een Django-app die Slug-velden biedt voor de luie.Examplesthere zijn vermoeiende voorbeelden in de tests, maar hier is de snelle vervallen: van django.db importmodellen van smartslugfieldclass simple (modellen.model): Slak = SMARTSLUGFIELD (max_length = 5, underscores = false) class complex (modellen.model): titel = modellen.charfield (max_length = 100) slak = smartslugfield (source_field = 'titel', datum_field = 'pub_date', split_on_words = true, max_Length = 10) PUB_DATE = MODELLEN.DATETIMEFIELD (AUTO_NOW = TRUE) >>> S1 = Simple.Objects.create (slak = 'Simple') >>> S1.Sluugsimpl >>> S2 = Simple.Objects.create (Slug = ' Simple ') >>> S2.Slugsim-1 >>> S3 = Simple.Objects.create (slak =' Simple ') >>> S3.Slugsim-2 >>> C1 = complex.Objects.create (titel =' Complex voorbeeld ') >>> C1.Slugcomplex >>> C2 = complex.Objects.create (titel =' complex voorbeeld ') >>> C2.SlugComplex_ Vereisten: · Python · Django


django-smart-slak Gerelateerde software