Skip to content

Commit

Permalink
add admin panel for training models
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy-Golodnykh committed Jun 11, 2024
1 parent 1bd3d53 commit d5aaf0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 1 addition & 2 deletions blackfox/fatsecret_api/urls.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""URLs for connection to FatSecret API"""

from django.urls import path

from fatsecret_api.views import (
AccessTokenView, FoodDiaryDailyView, FoodDiaryMonthlyView,
RequestTokenView, WeightDiaryView
RequestTokenView, WeightDiaryView,
)

urlpatterns = [
Expand Down
4 changes: 2 additions & 2 deletions blackfox/fatsecret_api/views.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import os
import datetime as dt
import os

from django.core.cache import cache
from django.shortcuts import redirect
from rauth import OAuth1Service
from rest_framework import status
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
from rest_framework.views import APIView
from rauth import OAuth1Service

CONSUMER_KEY = os.getenv('FATSECRET_CONSUMER_KEY')
CONSUMER_SECRET = os.getenv('FATSECRET_CONSUMER_SECRET')
Expand Down
8 changes: 7 additions & 1 deletion blackfox/training/admin.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# для админки
from django.contrib import admin

from training.models import Anthropometry, Diet, Project

admin.site.register(Anthropometry)
admin.site.register(Diet)
admin.site.register(Project)

0 comments on commit d5aaf0e

Please sign in to comment.