Commit 6288478b authored by Bonnegent's avatar Bonnegent
Browse files

en cours

parent 0c21ba2a
DEP=$(wildcard *.sty images/*.jpg images/*.png)
THEME=Custom
pdf/01.pdf: 01/slides.md $(DEP)
pandoc -st beamer -V theme:$(THEME) -V lang:fr-FR 01/slides.md -o pdf/01.pdf
pdf/01.pdf: cours_01.md $(DEP)
pandoc -st beamer -V theme:$(THEME) -V lang:fr-FR cours_01.md -o pdf/01.pdf
1: pdf/01.pdf
#impressive -t Crossfade --nologo pdf/01.pdf
......
......@@ -99,24 +99,6 @@ $ django-admin startproject monsite
\center\includegraphics[height=2.5cm]{images/tree-monsite.png}
## Lancement du serveur de développement
~~~
$ cd monsite
$ ./manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
You have 13 unapplied migration(s).
Your project may not work properly until
you apply the migrations for app(s): admin, ...
Run 'python manage.py migrate' to apply them.
...
~~~
## Création de l'application 1/2
Différences entre un projet et une application:
......@@ -141,3 +123,80 @@ $ python manage.py startapp fw
~~~
\center\includegraphics[height=3.5cm]{images/tree-monsite-fw.png}
## Activation de l'application
### vi monsite/settings.py
~~~python
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'fw',
'django_extensions',
]
~~~
## Le fichier de configuration
### monsite/settings{\_common,}.py
~~~
$ mv monsite/settings.py monsite/settings_common.py
$ cat monsite/settings.py
from .settings_common import *
DEBUG = True
ALLOWED_HOSTS = ['*']
SECRET_KEY = 'Une_clef_secrete_et_longue!'
~~~
## Configuration initiale
### Préparation de la BD
~~~
$ ./manage.py makemigrations
$ ./manage.py migrate
~~~
. . .
### Création d'un compte admin
~~~
$ ./manage.py createsuperuser
~~~
. . .
### Accès au shell
~~~
$ ./manage.py shell
$ ./manage.py shell_plus
~~~
## Lancement du serveur de développement
### ./manage.py runserver
~~~
Performing system checks...
System check identified no issues (0 silenced).
September 28, 2017 - 13:29:48
Django version 1.11, using settings 'monsite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
~~~
# FW
## Règles
- toto
- titi
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