Remove comment and add info in README file

This commit is contained in:
Gregory Trullemans 2022-09-04 12:59:31 +02:00
parent 2bb95e5ba7
commit 2902973029
2 changed files with 9 additions and 8 deletions

View File

@ -2,7 +2,7 @@
[![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
@ -11,7 +11,7 @@
- DATABASE_NAME : ultron
- DISABLE_COLLECTSTATIC : 1
- 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 :
@ -19,10 +19,12 @@
heroku config:set DISABLE_COLLECTSTATIC="1"
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 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`

View File

@ -42,7 +42,6 @@ def gymnast_lookup(request):
results = []
pattern = request.POST.get("pattern", None)
# Ignore queries shorter than length 3
if pattern is not None and len(pattern) > 3:
model_results = Gymnast.objects.filter(
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.
"""
if request.user.groups.filter(name='trainer').exists():
if request.user.groups.filter(name='Trainer').exists():
gymnast_list = Gymnast.objects.all()
context = {"gymnast_list": gymnast_list}
return render(request, "people/gymnasts/list.html", context)