Remove comment and add info in README file
This commit is contained in:
parent
2bb95e5ba7
commit
2902973029
14
README.md
14
README.md
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[![Build Status](https://drone.grimbox.be/api/badges/Sulley/Ultron/status.svg)](https://drone.grimbox.be/Sulley/Ultron)
|
[![Build Status](https://drone.grimbox.be/api/badges/Sulley/Ultron/status.svg)](https://drone.grimbox.be/Sulley/Ultron)
|
||||||
|
|
||||||
## Deploiement sur Heroku
|
## Déploiement sur Heroku
|
||||||
|
|
||||||
- Créer l'application sur Heroku
|
- Créer l'application sur Heroku
|
||||||
|
|
||||||
|
@ -11,18 +11,20 @@
|
||||||
- DATABASE_NAME : ultron
|
- DATABASE_NAME : ultron
|
||||||
- DISABLE_COLLECTSTATIC : 1
|
- DISABLE_COLLECTSTATIC : 1
|
||||||
- SECRET_KEY : django-insecure-g_eoy6z%xshku4o5#k%o%i_%nb%_pz80config_#+t%f
|
- SECRET_KEY : django-insecure-g_eoy6z%xshku4o5#k%o%i_%nb%_pz80config_#+t%f
|
||||||
- DATABASE_URL : créé automatiquement lorsqu'on ajoute l' `element` PostgreSQL
|
- DATABASE_URL : créé automatiquement lorsqu'on ajoute l' `element` PostgreSQL
|
||||||
|
|
||||||
Exemple :
|
Exemple :
|
||||||
|
|
||||||
```
|
```
|
||||||
heroku config:set DISABLE_COLLECTSTATIC="1"
|
heroku config:set DISABLE_COLLECTSTATIC="1"
|
||||||
heroku config:set ALLOWED_HOSTS="avengers-ultron.herokuapp.com"
|
heroku config:set ALLOWED_HOSTS="avengers-ultron.herokuapp.com"
|
||||||
heroku config:set SECRET_KEY="django-insecure-g_eoy6z%xshku4o5#k%o%i_%nb%_pz80config_#+t%f"
|
heroku config:set SECRET_KEY="django-insecure-g_eoy6z%xshku4o5#k%o%i_%nb%_pz80config_#+t%f"
|
||||||
heroku config:set DATABASE_NAME="ultron"
|
heroku config:set DATABASE_NAME="ultron"
|
||||||
```
|
```
|
||||||
|
|
||||||
- Push de l'application
|
- Push de l'application : `git push heroku master`
|
||||||
|
|
||||||
|
- Se connecter à Héroku (via l'invite de commande) : `heroku login`
|
||||||
|
|
||||||
- Création du super user : `heroku run python manage.py createsuperuser`
|
- Création du super user : `heroku run python manage.py createsuperuser`
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ def gymnast_lookup(request):
|
||||||
results = []
|
results = []
|
||||||
pattern = request.POST.get("pattern", None)
|
pattern = request.POST.get("pattern", None)
|
||||||
|
|
||||||
# Ignore queries shorter than length 3
|
|
||||||
if pattern is not None and len(pattern) > 3:
|
if pattern is not None and len(pattern) > 3:
|
||||||
model_results = Gymnast.objects.filter(
|
model_results = Gymnast.objects.filter(
|
||||||
Q(last_name__icontains=pattern) | Q(first_name__icontains=pattern)
|
Q(last_name__icontains=pattern) | Q(first_name__icontains=pattern)
|
||||||
|
@ -60,7 +59,7 @@ def gymnast_listing(request):
|
||||||
Si la personne connectée est un gymnaste : renvoie sa fiche détaillée.
|
Si la personne connectée est un gymnaste : renvoie sa fiche détaillée.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if request.user.groups.filter(name='trainer').exists():
|
if request.user.groups.filter(name='Trainer').exists():
|
||||||
gymnast_list = Gymnast.objects.all()
|
gymnast_list = Gymnast.objects.all()
|
||||||
context = {"gymnast_list": gymnast_list}
|
context = {"gymnast_list": gymnast_list}
|
||||||
return render(request, "people/gymnasts/list.html", context)
|
return render(request, "people/gymnasts/list.html", context)
|
||||||
|
|
Loading…
Reference in New Issue