Skip to content
Snippets Groups Projects
Commit 2ffddc90 authored by florimondmanca's avatar florimondmanca
Browse files

update README

parent 9671d0f0
Branches
No related tags found
No related merge requests found
...@@ -34,6 +34,8 @@ $ python manage.py migrate ...@@ -34,6 +34,8 @@ $ python manage.py migrate
$ python manage.py runserver $ python manage.py runserver
``` ```
Le site sera accessible à l'adresse `http://localhost:8000`.
## Notes d'implémentation ## Notes d'implémentation
#### Stockage de fichiers uploadés dans Django : les médias #### Stockage de fichiers uploadés dans Django : les médias
...@@ -58,6 +60,7 @@ Dans un contexte de développement, on peut se permettre de servir les fichiers ...@@ -58,6 +60,7 @@ Dans un contexte de développement, on peut se permettre de servir les fichiers
```python ```python
# uploadexample/urls.py # uploadexample/urls.py
if settings.DEBUG: if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, urlpatterns += static(settings.MEDIA_URL,
document_root=settings.MEDIA_ROOT) document_root=settings.MEDIA_ROOT)
...@@ -71,6 +74,7 @@ Sur le modèle, on utilise un champ `FileField` : ...@@ -71,6 +74,7 @@ Sur le modèle, on utilise un champ `FileField` :
```python ```python
# upload/models.py # upload/models.py
class StudentRegistration(models.Model): class StudentRegistration(models.Model):
... ...
image_agreement = models.FileField("autorisation de droit à l'image") image_agreement = models.FileField("autorisation de droit à l'image")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment