BO 1.33 training program
This commit is contained in:
parent
60927674ee
commit
3a429e714b
@ -16,3 +16,4 @@ from .controlling import ControllingAdmin
|
||||
from .sport import SportAdmin
|
||||
from .app_text import AppTextAdmin
|
||||
from .notification import NotificationAdmin
|
||||
from .training_program import TrainingProgramAdmin
|
@ -100,7 +100,7 @@ class TranslationTrainingPlanInline(admin.TabularInline):
|
||||
|
||||
class TrainingPlanAdmin( admin.ModelAdmin):
|
||||
list_display = ('training_plan_id', 'name', 'internal_name', 'free', 'active')
|
||||
fields = ('tree', 'name', 'description', 'internal_name', 'free', 'active')
|
||||
fields = ('tree','training_program', 'name', 'description', 'internal_name', 'free', 'active', 'weeks')
|
||||
list_editable = ('name', 'internal_name', 'free', 'active')
|
||||
|
||||
def save_model(self, request, obj, form, change):
|
||||
|
@ -0,0 +1,13 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from ..models.training_program import TrainingProgram
|
||||
|
||||
|
||||
class TrainingProgramAdmin(admin.ModelAdmin):
|
||||
list_display = ('training_program_id', 'name',)
|
||||
fields = ('name',)
|
||||
list_editable = ('name',)
|
||||
|
||||
|
||||
admin.site.register(TrainingProgram, TrainingProgramAdmin)
|
||||
admin.autodiscover()
|
Binary file not shown.
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-10-17 10:52+0200\n"
|
||||
"POT-Creation-Date: 2021-11-11 20:59+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -26,10 +26,16 @@ msgstr ""
|
||||
msgid "Image Preview"
|
||||
msgstr "Kép előnézet"
|
||||
|
||||
#: .\aitrainer_backoffice\admin\evaluation.py:29
|
||||
#: .\aitrainer_backoffice\admin\evaluation.py:27
|
||||
msgid "Clone the selected evaluation"
|
||||
msgstr "Kiértékelés klónozása"
|
||||
|
||||
#: .\aitrainer_backoffice\admin\exercise_type.py:56
|
||||
#, fuzzy
|
||||
#| msgid "exercise_type"
|
||||
msgid "Clone exercise type"
|
||||
msgstr "Aktuális gyakorlat"
|
||||
|
||||
#: .\aitrainer_backoffice\admin\inline_select_action.py:116
|
||||
msgid "Actions"
|
||||
msgstr "Akciók"
|
||||
@ -89,7 +95,7 @@ msgstr "App Fordítások"
|
||||
#: .\aitrainer_backoffice\models\faq.py:34
|
||||
#: .\aitrainer_backoffice\models\property.py:29
|
||||
#: .\aitrainer_backoffice\models\sports.py:29
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:58
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:61
|
||||
#: .\aitrainer_backoffice\models\training_plan_day.py:31
|
||||
#: .\aitrainer_backoffice\models\tutorial.py:45
|
||||
msgid "Translation"
|
||||
@ -105,7 +111,7 @@ msgstr "Fordítás"
|
||||
#: .\aitrainer_backoffice\models\faq.py:35
|
||||
#: .\aitrainer_backoffice\models\property.py:30
|
||||
#: .\aitrainer_backoffice\models\sports.py:30
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:59
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:62
|
||||
#: .\aitrainer_backoffice\models\training_plan_day.py:32
|
||||
#: .\aitrainer_backoffice\models\tutorial.py:46
|
||||
msgid "Translations"
|
||||
@ -119,25 +125,23 @@ msgstr "Fordítások"
|
||||
#: .\aitrainer_backoffice\models\split_tests.py:7
|
||||
#: .\aitrainer_backoffice\models\sports.py:9
|
||||
#: .\aitrainer_backoffice\models\sports.py:25
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:14
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:16
|
||||
#: .\aitrainer_backoffice\models\training_plan_day.py:11
|
||||
#: .\aitrainer_backoffice\models\training_plan_day.py:27
|
||||
#: .\aitrainer_backoffice\models\training_program.py:11
|
||||
#: .\aitrainer_backoffice\models\tutorial.py:11
|
||||
msgid "name"
|
||||
msgstr "Név"
|
||||
|
||||
#: .\aitrainer_backoffice\models\customer.py:10
|
||||
#| msgid "name"
|
||||
msgid "firstname"
|
||||
msgstr "Keresztnév"
|
||||
|
||||
#: .\aitrainer_backoffice\models\customer.py:28
|
||||
#| msgid "Customer Property"
|
||||
msgid "Customer"
|
||||
msgstr "Ügyfél"
|
||||
|
||||
#: .\aitrainer_backoffice\models\customer.py:29
|
||||
#| msgid "Customer Properties"
|
||||
msgid "Customers"
|
||||
msgstr "Ügyfelek"
|
||||
|
||||
@ -288,7 +292,7 @@ msgid "Exercise Parents"
|
||||
msgstr "Gyakorlat szülők"
|
||||
|
||||
#: .\aitrainer_backoffice\models\exercisetree.py:15
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:17
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:19
|
||||
msgid "internal_name"
|
||||
msgstr ""
|
||||
|
||||
@ -317,12 +321,11 @@ msgstr "GYÍK"
|
||||
msgid "FAQs"
|
||||
msgstr "GYÍK"
|
||||
|
||||
#: .\aitrainer_backoffice\models\notification.py:20
|
||||
#: .\aitrainer_backoffice\models\notification.py:21
|
||||
msgid "Notification"
|
||||
msgstr ""
|
||||
|
||||
#: .\aitrainer_backoffice\models\notification.py:21
|
||||
#| msgid "Descriptions"
|
||||
#: .\aitrainer_backoffice\models\notification.py:22
|
||||
msgid "Notifications"
|
||||
msgstr ""
|
||||
|
||||
@ -366,32 +369,38 @@ msgstr ""
|
||||
msgid "Sports"
|
||||
msgstr ""
|
||||
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:23
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:26
|
||||
msgid "Training Plan"
|
||||
msgstr "Edzésprogram"
|
||||
msgstr "Edzésterv"
|
||||
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:24
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:27
|
||||
msgid "Training Plans"
|
||||
msgstr "Edzésprogramok"
|
||||
msgstr "Edzéstervek"
|
||||
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:44
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:47
|
||||
msgid "Training Plan Detail"
|
||||
msgstr "Edzésprogram részlet"
|
||||
msgstr "Edzésterv részlet"
|
||||
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:45
|
||||
#: .\aitrainer_backoffice\models\training_plan.py:48
|
||||
msgid "Training Plan Details"
|
||||
msgstr "Edzésprogram részletek"
|
||||
msgstr "Edzésterv részletek"
|
||||
|
||||
#: .\aitrainer_backoffice\models\training_plan_day.py:15
|
||||
#| msgid "Training Plan"
|
||||
msgid "Training Day"
|
||||
msgstr "Edzésnap"
|
||||
|
||||
#: .\aitrainer_backoffice\models\training_plan_day.py:16
|
||||
#| msgid "Training Plans"
|
||||
msgid "Training Days"
|
||||
msgstr "Edzésnapok"
|
||||
|
||||
#: .\aitrainer_backoffice\models\training_program.py:15
|
||||
msgid "Training Program"
|
||||
msgstr "Edzésprogram"
|
||||
|
||||
#: .\aitrainer_backoffice\models\training_program.py:16
|
||||
msgid "Training Programs"
|
||||
msgstr "Edzésprogramok"
|
||||
|
||||
#: .\aitrainer_backoffice\models\tutorial.py:15
|
||||
msgid "Tutorial"
|
||||
msgstr "Tutorial"
|
||||
|
@ -5,11 +5,13 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from .enums import LanguageTypes
|
||||
from ..models import ExerciseType, ExerciseTree
|
||||
from ..models.training_plan_day import TrainingPlanDay
|
||||
from ..models.training_program import TrainingProgram
|
||||
|
||||
|
||||
class TrainingPlan(models.Model):
|
||||
training_plan_id = models.AutoField(primary_key=True)
|
||||
tree = models.ForeignKey(ExerciseTree,on_delete=models.CASCADE, limit_choices_to={'active':True})
|
||||
training_program = models.ForeignKey(TrainingProgram, on_delete=models.CASCADE)
|
||||
name = models.CharField(max_length=100, help_text='The name of the training plan',
|
||||
verbose_name=_("name"))
|
||||
description = RichTextField(blank=True, null=True)
|
||||
@ -17,6 +19,7 @@ class TrainingPlan(models.Model):
|
||||
verbose_name=_("internal_name"))
|
||||
free = models.BooleanField(blank=True)
|
||||
active = models.BooleanField()
|
||||
weeks = models.IntegerField(blank=True, null=True )
|
||||
|
||||
class Meta:
|
||||
db_table = 'training_plan'
|
||||
|
@ -0,0 +1,19 @@
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from ckeditor.fields import RichTextField
|
||||
|
||||
from .enums import LanguageTypes
|
||||
|
||||
|
||||
class TrainingProgram(models.Model):
|
||||
training_program_id = models.AutoField(primary_key=True)
|
||||
name = models.CharField(max_length=200, help_text='Unique description name',
|
||||
verbose_name=_("name"))
|
||||
|
||||
class Meta:
|
||||
db_table = 'training_program'
|
||||
verbose_name = _("Training Program")
|
||||
verbose_name_plural = _("Training Programs")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
@ -1,7 +1,7 @@
|
||||
import os
|
||||
from firebase_admin import initialize_app
|
||||
|
||||
BACKOFFICE_VERSION = "1.32"
|
||||
BACKOFFICE_VERSION = "1.33"
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
@ -51,7 +51,7 @@ INSTALLED_APPS = [
|
||||
'adminsortable2',
|
||||
'inline_actions',
|
||||
'django_cron',
|
||||
'firebase_admin'
|
||||
'firebase_admin',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
@ -1,7 +1,7 @@
|
||||
import os
|
||||
from firebase_admin import initialize_app
|
||||
|
||||
BACKOFFICE_VERSION = "1.32"
|
||||
BACKOFFICE_VERSION = "1.33"
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
@ -35,7 +35,7 @@ INSTALLED_APPS = [
|
||||
'adminsortable2',
|
||||
'inline_actions',
|
||||
'django_cron',
|
||||
'firebase_admin'
|
||||
'firebase_admin',
|
||||
]
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import os
|
||||
from firebase_admin import initialize_app
|
||||
|
||||
BACKOFFICE_VERSION = "1.32"
|
||||
BACKOFFICE_VERSION = "1.33"
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
@ -55,10 +55,12 @@ class FCM:
|
||||
return "Registration token is null"
|
||||
try:
|
||||
|
||||
if image_url == None or self.image_base == None:
|
||||
notification_image_url = self.logo_url
|
||||
''' if image_url == None or self.image_base == None:
|
||||
notification_image_url = self.logo_url
|
||||
else:
|
||||
notification_image_url = self.image_base + '/' + image_url
|
||||
'''
|
||||
|
||||
print(f'image: {notification_image_url}' )
|
||||
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-10-17 10:52+0200\n"
|
||||
"POT-Creation-Date: 2021-11-11 20:59+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -2,6 +2,24 @@ version: "3.7"
|
||||
|
||||
services:
|
||||
|
||||
uvdesk:
|
||||
image: dietermartens/uvdesk
|
||||
environment:
|
||||
# installation in dev, change it after installation to prod
|
||||
- APP_ENV=dev
|
||||
- APP_SECRET=8237945gker
|
||||
- TZ=Europe/Budapest
|
||||
- APP_TIMEZONE=Europe/Budapest
|
||||
- APP_CURRENCY=EUR
|
||||
- CRON_USER1=root
|
||||
- CRON_SCHEDULE1=*/5 * * * *
|
||||
# - CRON_COMMAND1=cd /usr/local/uvdesk && php bin/console uvdesk:refresh-mailbox info@domain.tld support@domain.tld
|
||||
restart: always
|
||||
volumes:
|
||||
- uvdesk:/usr/local/uvdesk
|
||||
ports:
|
||||
- "7089:89"
|
||||
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
@ -40,6 +58,8 @@ services:
|
||||
- /home/bosi/backoffice/aitrainer_backoffice/mysqlconf:/etc/mysql/conf.d
|
||||
ports:
|
||||
- "33060:3306"
|
||||
networks:
|
||||
- redis_tier
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin:latest
|
||||
@ -53,6 +73,8 @@ services:
|
||||
volumes:
|
||||
- ./htpasswd:/etc/phpmyadmin/.htpasswd
|
||||
- ./phpmyadmin.config.php:/etc/phpmyadmin/config.user.inc.php
|
||||
networks:
|
||||
- redis_tier
|
||||
|
||||
wordpress:
|
||||
image: wordpress
|
||||
@ -62,6 +84,7 @@ services:
|
||||
- mysql-server:mysql
|
||||
depends_on:
|
||||
- mysql-server
|
||||
- redis
|
||||
ports:
|
||||
- "8090:80"
|
||||
environment:
|
||||
@ -73,8 +96,28 @@ services:
|
||||
WORDPRESS_DB_NAME: wp
|
||||
volumes:
|
||||
- wordpress:/var/www/html
|
||||
- ./wp_php_custom.ini:/usr/local/etc/php/conf.d/uploads.ini
|
||||
- ./wp_htaccess:/var/www/html/.htaccess
|
||||
#- ./wp_php_custom.ini:/usr/local/etc/php/conf.d/uploads.ini:chached
|
||||
- type: bind
|
||||
target: /etc/php/conf.d/uploads.ini
|
||||
source: /usr/local/bin/wordpress/wp_php_custom.ini
|
||||
consistency: cached
|
||||
#- ./wp_htaccess:/var/www/html/.htaccess
|
||||
- type: bind
|
||||
target: /var/www/html/.htaccess
|
||||
source: /usr/local/bin/wordpress/wp_htaccess
|
||||
consistency: cached
|
||||
- /usr/local/bin/wordpress/wp-content/uploads:/var/www/html/wp-content/uploads:cached
|
||||
networks:
|
||||
- redis_tier
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
environment:
|
||||
- REDIS_URL=redis://redis
|
||||
ports:
|
||||
- '6379:6379'
|
||||
networks:
|
||||
- redis_tier
|
||||
|
||||
mautic:
|
||||
image: mautic/mautic:v3
|
||||
@ -93,6 +136,8 @@ services:
|
||||
- MAUTIC_DB_PASSWORD=$MYSQL_ROOT_PASSWORD
|
||||
- MAUTIC_DB_NAME=mautic
|
||||
- MAUTIC_RUN_CRON_JOBS=true
|
||||
networks:
|
||||
- redis_tier
|
||||
|
||||
api:
|
||||
# container_name: api_server
|
||||
@ -149,6 +194,8 @@ services:
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
networks:
|
||||
- redis_tier
|
||||
|
||||
volumes:
|
||||
mysql-data-backoffice:
|
||||
@ -156,3 +203,9 @@ volumes:
|
||||
static:
|
||||
wordpress:
|
||||
mautic_data:
|
||||
uvdesk:
|
||||
redis_data:
|
||||
|
||||
networks:
|
||||
redis_tier:
|
||||
driver: bridge
|
Loading…
Reference in New Issue
Block a user