Commit c00e2cf9 authored by Bonnegent Sebastien's avatar Bonnegent Sebastien
Browse files

fix python3.6 pour les salles de TP

parent 928e81dc
Pipeline #11788 passed with stages
in 16 seconds
......@@ -159,6 +159,7 @@ ModuleNotFoundError: No module named 'django'
## Création du projet
~~~bash
$ django-admin startproject conf .
$ tree
~~~
![](images/tree-conf.png)
......@@ -198,29 +199,29 @@ SECRET_KEY = 'Une_clef_secrete_et_longue!'
## Configuration
### Pour générer une nouvelle clé secrête
~~~bash
$ python ./manage.py generate_secret_key
$ python3 ./manage.py generate_secret_key
f#wgrz$@#wh@*x5)_+(*$$^aw(c!q#a4)c0230bwp!iy
~~~
## Gestion des migrations
### Création (si nécessaire)
~~~bash
$ python ./manage.py makemigrations
$ python3 ./manage.py makemigrations
~~~
## Gestion des migrations
### Application
~~~bash
$ python ./manage.py migrate
$ python3 ./manage.py migrate
~~~
![](images/tree-migrate-initial.png)
## Quelques commandes utiles
~~~bash
$ python ./manage.py shell
$ python3 ./manage.py shell
$ # shell avec chargement automatique des modèles
$ # mise à dispo par django_extensions
$ python ./manage.py shell_plus
$ python3 ./manage.py shell_plus
~~~
# Notre projet
......@@ -254,11 +255,11 @@ class Port(models.Model):
## Appliquer les modifications
~~~bash
$ python ./manage.py makemigrations
$ python3 ./manage.py makemigrations
Migrations for 'webui':
webui/migrations/0001_initial.py
- Create model Port
$ python ./manage.py migrate
$ python3 ./manage.py migrate
...
~~~
......
asgiref==3.3.0
backcall==0.2.0
decorator==4.4.2
Django==3.1.3
django-bootstrap-static==4.2.1
django-extensions==3.0.9
fontawesome==5.10.1.post1
ipython==7.16.1
ipython-genutils==0.2.0
jedi==0.17.2
parso==0.7.1
pexpect==4.8.0
pickleshare==0.7.5
prompt-toolkit==3.0.8
ptyprocess==0.6.0
Pygments==2.7.2
pytz==2020.4
sqlparse==0.4.1
traitlets==4.3.3
wcwidth==0.2.5
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment