From 7ba3ca52d94e1293364f792e66d28c4554e2a1f1 Mon Sep 17 00:00:00 2001 From: jingrow Date: Thu, 1 May 2025 11:41:30 +0800 Subject: [PATCH] feat: Initialize App --- .gitignore | 7 + README.md | 7 + license.txt | 1 + pyproject.toml | 20 +++ task/__init__.py | 1 + task/config/__init__.py | 0 task/hooks.py | 244 +++++++++++++++++++++++++++++++ task/modules.txt | 1 + task/patches.txt | 6 + task/public/.gitkeep | 0 task/task/__init__.py | 0 task/templates/__init__.py | 0 task/templates/pages/__init__.py | 0 13 files changed, 287 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 license.txt create mode 100644 pyproject.toml create mode 100644 task/__init__.py create mode 100644 task/config/__init__.py create mode 100644 task/hooks.py create mode 100644 task/modules.txt create mode 100644 task/patches.txt create mode 100644 task/public/.gitkeep create mode 100644 task/task/__init__.py create mode 100644 task/templates/__init__.py create mode 100644 task/templates/pages/__init__.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba04025 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +*.pyc +*.egg-info +*.swp +tags +node_modules +__pycache__ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..5924e90 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +## Task + +api endpoint + +#### License + +mit \ No newline at end of file diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..36eda79 --- /dev/null +++ b/license.txt @@ -0,0 +1 @@ +mit \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..df8fa28 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,20 @@ +[project] +name = "task" +authors = [ + { name = "Jingrow", email = "support@jingrow.com"} +] +description = "api endpoint" +requires-python = ">=3.10" +readme = "README.md" +dynamic = ["version"] +dependencies = [ + # "jingrow~=15.0.0" # Installed and managed by bench. +] + +[build-system] +requires = ["flit_core >=3.4,<4"] +build-backend = "flit_core.buildapi" + +# These dependencies are only installed when developer mode is enabled +[tool.bench.dev-dependencies] +# package_name = "~=1.1.0" diff --git a/task/__init__.py b/task/__init__.py new file mode 100644 index 0000000..f102a9c --- /dev/null +++ b/task/__init__.py @@ -0,0 +1 @@ +__version__ = "0.0.1" diff --git a/task/config/__init__.py b/task/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/task/hooks.py b/task/hooks.py new file mode 100644 index 0000000..46a3bc3 --- /dev/null +++ b/task/hooks.py @@ -0,0 +1,244 @@ +app_name = "task" +app_title = "Task" +app_publisher = "Jingrow" +app_description = "api endpoint" +app_email = "support@jingrow.com" +app_license = "mit" + +# Apps +# ------------------ + +# required_apps = [] + +# Each item in the list will be shown as an app in the apps page +# add_to_apps_screen = [ +# { +# "name": "task", +# "logo": "/assets/task/logo.png", +# "title": "Task", +# "route": "/task", +# "has_permission": "task.api.permission.has_app_permission" +# } +# ] + +# Includes in +# ------------------ + +# include js, css files in header of desk.html +# app_include_css = "/assets/task/css/task.css" +# app_include_js = "/assets/task/js/task.js" + +# include js, css files in header of web template +# web_include_css = "/assets/task/css/task.css" +# web_include_js = "/assets/task/js/task.js" + +# include custom scss in every website theme (without file extension ".scss") +# website_theme_scss = "task/public/scss/website" + +# include js, css files in header of web form +# webform_include_js = {"pagetype": "public/js/pagetype.js"} +# webform_include_css = {"pagetype": "public/css/pagetype.css"} + +# include js in page +# page_js = {"page" : "public/js/file.js"} + +# include js in pagetype views +# pagetype_js = {"pagetype" : "public/js/pagetype.js"} +# pagetype_list_js = {"pagetype" : "public/js/pagetype_list.js"} +# pagetype_tree_js = {"pagetype" : "public/js/pagetype_tree.js"} +# pagetype_calendar_js = {"pagetype" : "public/js/pagetype_calendar.js"} + +# Svg Icons +# ------------------ +# include app icons in desk +# app_include_icons = "task/public/icons.svg" + +# Home Pages +# ---------- + +# application home page (will override Website Settings) +# home_page = "login" + +# website user home page (by Role) +# role_home_page = { +# "Role": "home_page" +# } + +# Generators +# ---------- + +# automatically create page for each record of this pagetype +# website_generators = ["Web Page"] + +# Jinja +# ---------- + +# add methods and filters to jinja environment +# jinja = { +# "methods": "task.utils.jinja_methods", +# "filters": "task.utils.jinja_filters" +# } + +# Installation +# ------------ + +# before_install = "task.install.before_install" +# after_install = "task.install.after_install" + +# Uninstallation +# ------------ + +# before_uninstall = "task.uninstall.before_uninstall" +# after_uninstall = "task.uninstall.after_uninstall" + +# Integration Setup +# ------------------ +# To set up dependencies/integrations with other apps +# Name of the app being installed is passed as an argument + +# before_app_install = "task.utils.before_app_install" +# after_app_install = "task.utils.after_app_install" + +# Integration Cleanup +# ------------------- +# To clean up dependencies/integrations with other apps +# Name of the app being uninstalled is passed as an argument + +# before_app_uninstall = "task.utils.before_app_uninstall" +# after_app_uninstall = "task.utils.after_app_uninstall" + +# Desk Notifications +# ------------------ +# See jingrow.core.notifications.get_notification_config + +# notification_config = "task.notifications.get_notification_config" + +# Permissions +# ----------- +# Permissions evaluated in scripted ways + +# permission_query_conditions = { +# "Event": "jingrow.desk.pagetype.event.event.get_permission_query_conditions", +# } +# +# has_permission = { +# "Event": "jingrow.desk.pagetype.event.event.has_permission", +# } + +# PageType Class +# --------------- +# Override standard pagetype classes + +# override_pagetype_class = { +# "ToDo": "custom_app.overrides.CustomToDo" +# } + +# Document Events +# --------------- +# Hook on document methods and events + +# pg_events = { +# "*": { +# "on_update": "method", +# "on_cancel": "method", +# "on_trash": "method" +# } +# } + +# Scheduled Tasks +# --------------- + +# scheduler_events = { +# "all": [ +# "task.tasks.all" +# ], +# "daily": [ +# "task.tasks.daily" +# ], +# "hourly": [ +# "task.tasks.hourly" +# ], +# "weekly": [ +# "task.tasks.weekly" +# ], +# "monthly": [ +# "task.tasks.monthly" +# ], +# } + +# Testing +# ------- + +# before_tests = "task.install.before_tests" + +# Overriding Methods +# ------------------------------ +# +# override_whitelisted_methods = { +# "jingrow.desk.pagetype.event.event.get_events": "task.event.get_events" +# } +# +# each overriding function accepts a `data` argument; +# generated from the base implementation of the pagetype dashboard, +# along with any modifications made in other Jingrow apps +# override_pagetype_dashboards = { +# "Task": "task.task.get_dashboard_data" +# } + +# exempt linked doctypes from being automatically cancelled +# +# auto_cancel_exempted_pagetypes = ["Auto Repeat"] + +# Ignore links to specified DocTypes when deleting documents +# ----------------------------------------------------------- + +# ignore_links_on_delete = ["Communication", "ToDo"] + +# Request Events +# ---------------- +# before_request = ["task.utils.before_request"] +# after_request = ["task.utils.after_request"] + +# Job Events +# ---------- +# before_job = ["task.utils.before_job"] +# after_job = ["task.utils.after_job"] + +# User Data Protection +# -------------------- + +# user_data_fields = [ +# { +# "pagetype": "{pagetype_1}", +# "filter_by": "{filter_by}", +# "redact_fields": ["{field_1}", "{field_2}"], +# "partial": 1, +# }, +# { +# "pagetype": "{pagetype_2}", +# "filter_by": "{filter_by}", +# "partial": 1, +# }, +# { +# "pagetype": "{pagetype_3}", +# "strict": False, +# }, +# { +# "pagetype": "{pagetype_4}" +# } +# ] + +# Authentication and authorization +# -------------------------------- + +# auth_hooks = [ +# "task.auth.validate" +# ] + +# Automatically update python controller files with type annotations for this app. +# export_python_type_annotations = True + +# default_log_clearing_pagetypes = { +# "Logging PageType Name": 30 # days to retain logs +# } + diff --git a/task/modules.txt b/task/modules.txt new file mode 100644 index 0000000..52029c1 --- /dev/null +++ b/task/modules.txt @@ -0,0 +1 @@ +Task \ No newline at end of file diff --git a/task/patches.txt b/task/patches.txt new file mode 100644 index 0000000..f37318f --- /dev/null +++ b/task/patches.txt @@ -0,0 +1,6 @@ +[pre_model_sync] +# Patches added in this section will be executed before doctypes are migrated +# Read docs to understand patches: https://framework.jingrow.com/docs/v14/user/en/database-migrations + +[post_model_sync] +# Patches added in this section will be executed after doctypes are migrated \ No newline at end of file diff --git a/task/public/.gitkeep b/task/public/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/task/task/__init__.py b/task/task/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/task/templates/__init__.py b/task/templates/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/task/templates/pages/__init__.py b/task/templates/pages/__init__.py new file mode 100644 index 0000000..e69de29