2017-04-19 7 views
-1

J'ai regardé les discussions sur ce sujet et je n'ai pas réussi à trouver une solution. J'essaie d'utiliser la bibliothèque HandsOnTable (https://handsontable.com/) dans une application Django. J'essaye d'installer la bibliothèque avec django-bower mais je ne peux pas sembler la configurer correctement. Chaque fois que je pense que django-bower est installé, le fichier settings.py ne trouve pas django-bower sous Installed Apps. Quelqu'un peut-il me diriger vers un didacticiel approprié sur la façon d'installer/configurer django-bower dans un virtualenv Django?Django Bower Installer Virtualenv

Répondre

1
  1. Créez votre virtualnev

    virtualenv test_env 
    
  2. Activez votre environnement virtuel

    source test_env/bin/activate 
    
  3. Installer charmille du NPM:

    npm install -g bower 
    
  4. Et djan package go-charmille:

    pip install django-bower 
    
  5. Ajouter django-Bower INSTALLED_APPS dans vos paramètres:

    'djangobower', 
    
  6. Ajouter staticfinder à STATICFILES_FINDERS:

    'djangobower.finders.BowerFinder', 
    
  7. Indique le chemin à la racine des composants (vous devez utiliser le chemin absolu):

    BOWER_COMPONENTS_ROOT = '/PROJECT_ROOT/components/' 
    

Ref: http://django-bower.readthedocs.io/en/latest/installation.html