Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT →
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
utilisateurs:hypathie:tutos:developpement-pyhon-utiliser-django [04/12/2015 11:54] Hypathie [Création d'un premier projet Django] |
utilisateurs:hypathie:tutos:developpement-pyhon-utiliser-django [05/12/2015 17:08] martinux_qc |
||
---|---|---|---|
Ligne 5: | Ligne 5: | ||
- | ===== Configurations et installation de Django ===== | + | ===== Configurations et installation de Django avec SQLite3===== |
==== Activer Python3 sur Jessie ==== | ==== Activer Python3 sur Jessie ==== | ||
Ligne 46: | Ligne 46: | ||
<note important> | <note important> | ||
- | Si l'on choisit d'utiliser Python3 pour tous le système, il faudra prendre garde de bien installer les outils python3 et non python2 :\ | + | Si l'on choisit d'utiliser Python3 pour tout le système, il faudra prendre garde de bien installer les outils python3 et non python2 :\ |
Il faudra lancer : | Il faudra lancer : | ||
Ligne 605: | Ligne 605: | ||
{{http://pix.toile-libre.org/upload/original/1449161189.png}} | {{http://pix.toile-libre.org/upload/original/1449161189.png}} | ||
+ | * Pour apprendre à gérer son site depuis le site d'administration de Django : https://docs.djangoproject.com/fr/1.8/intro/tutorial02/ | ||
+ | |||
+ | * Le création des Vues : https://docs.djangoproject.com/fr/1.8/intro/tutorial03/#writing-your-first-django-app-part-3 | ||
+ | |||
+ | * Factoriser son code Python : https://docs.djangoproject.com/fr/1.8/intro/tutorial04/#writing-your-first-django-app-part-4 | ||
+ | |||
+ | * Tests automatisés : https://docs.djangoproject.com/fr/1.8/intro/tutorial05/ | ||
+ | |||
+ | * Utiliser du Javascript, du CSS avec Django : https://docs.djangoproject.com/fr/1.8/intro/tutorial06/#writing-your-first-django-app-part-6 | ||
+ | |||
+ | |||
+ | ====Configurer Vim pour Python ==== | ||
+ | |||
+ | * On installe curl | ||
+ | |||
+ | <code root>apt-get install curl</code> | ||
+ | |||
+ | * On installe git : | ||
+ | |||
+ | <code root>apt-get install git-core</code> | ||
+ | |||
+ | * On installe pathogen | ||
+ | |||
+ | Voir : https://github.com/search?utf8=%E2%9C%93&q=pathogen | ||
+ | |||
+ | <code user> | ||
+ | mkdir -p ~/.vim/autoload ~/.vim/bundle && \ | ||
+ | curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim | ||
+ | </code> | ||
+ | |||
+ | * On crée et édite un fichier caché ~/.vimrc : | ||
+ | |||
+ | <code user>vim ~/.vimrc<code> | ||
+ | |||
+ | <code> | ||
+ | execute pathogen#infect() | ||
+ | syntax on | ||
+ | filetype plugin indent on | ||
+ | </code> | ||
+ | |||
+ | pathogen va chercher dans le répertoire bundle les plugin qu'on lui a installé et les utiliser comme si on les avait installé dans le fichier .vimrc | ||
+ | |||
+ | * On installe le module nerdtree : | ||
+ | |||
+ | Voir : https://github.com/scrooloose/nerdtree | ||
+ | |||
+ | <code user>git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree</code> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Configurations et installation de Django avec PostgreSQL===== |