Gargoyle.

Una piattaforma per l'offerta di w / warstable a Django
Scarica ora

Gargoyle. Classifica e riepilogo

Annuncio pubblicitario

  • Rating:
  • Licenza:
  • The Apache License 2.0
  • Nome editore:
  • DISQUS
  • Sito web dell'editore:
  • http://disqus.com

Gargoyle. Tag


Gargoyle. Descrizione

Una piattaforma per il traffico di w / warstable a Django Gargoyle è una piattaforma per gestire le commutazione di funzionalità in Django. Installare: PIP Installa GargoyleAneable IT: se non hai già abilitato Nexus, dovrai farlo prima: # Impostazioni.pyinstalled_apps = (... 'Nexus',) # urls.pyimport nexusnexus.autodiscover () urlpatterns = patterns ('', ('^ nexus /', include (nexus.site.urls)),) (Nexus è un sostituto per il tuo amministratore Django, che funziona con Django.Contrib .ADMIN) # Impostazioni.PY installato_apps = (... 'Gargoyle') All'interno della tua funzione Gargoyle Import Gargoyledef my_function (richiesta): se Gargoyle.is_active ('nome switch', richiesta): restituisce 'foo' else: restituisce 'bar' # con oggetti personalizzati da gargoyle import gargoyledef my_method (utente): se Gargoyle. is_active ('nome switch' ', utente): restituisce' foo 'Else: restituisce' bar'appendendolo: # myApp / Gargoyle.pyfrom Gargoyle Import Conditionsfrom django.contrib.sites.m Odels Import SiteClass SiteCitionSetionSet (Condizioni.ModelConitionSet): percentuale = Conditions.percent () Domain = Conditions.String () Gargoyle.Register (SiteConditionset (sito)) Gargoyle.is_active ("il mio switch name", sito.objects.get_current () ) Requisiti: · Django. · Python.


Gargoyle. Software correlato