feat [back]: proper configuration file
This commit is contained in:
parent
e8aa8bb460
commit
640644781c
3 changed files with 8 additions and 2 deletions
1
server/.gitignore
vendored
1
server/.gitignore
vendored
|
@ -135,3 +135,4 @@ GitHub.sublime-settings
|
|||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history
|
||||
*.ini
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -123,3 +123,5 @@ REST_FRAMEWORK = {
|
|||
"djangorestframework_camel_case.parser.CamelCaseJSONParser",
|
||||
),
|
||||
}
|
||||
|
||||
TMDB_API_KEY = config.getstr("tmdb.api_key")
|
||||
|
|
Loading…
Reference in a new issue