feat [back]: proper configuration file

This commit is contained in:
Alice 2022-06-10 00:18:56 +02:00
parent e8aa8bb460
commit 640644781c
3 changed files with 8 additions and 2 deletions

1
server/.gitignore vendored
View file

@ -135,3 +135,4 @@ GitHub.sublime-settings
!.vscode/launch.json
!.vscode/extensions.json
.history
*.ini

View file

@ -2,9 +2,12 @@ from rest_framework import viewsets
from rest_framework.decorators import action
from rest_framework.response import Response
from tmdbv3api import TMDb, Search
from tmdbv3api import TMDb, Search, Movie
from ulm_cine_club_api.settings.base import TMDB_API_KEY
tmdb = TMDb()
tmdb.api_key = "" # TODO configure key in settings
tmdb.api_key = TMDB_API_KEY
tmdb.language = "fr"

View file

@ -123,3 +123,5 @@ REST_FRAMEWORK = {
"djangorestframework_camel_case.parser.CamelCaseJSONParser",
),
}
TMDB_API_KEY = config.getstr("tmdb.api_key")