feat: Initialize App
This commit is contained in:
commit
a9bcc9c1de
16 changed files with 267 additions and 0 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
.DS_Store
|
||||||
|
*.pyc
|
||||||
|
*.egg-info
|
||||||
|
*.swp
|
||||||
|
tags
|
||||||
|
u_utils/docs/current
|
18
MANIFEST.in
Normal file
18
MANIFEST.in
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
include MANIFEST.in
|
||||||
|
include requirements.txt
|
||||||
|
include *.json
|
||||||
|
include *.md
|
||||||
|
include *.py
|
||||||
|
include *.txt
|
||||||
|
recursive-include u_utils *.css
|
||||||
|
recursive-include u_utils *.csv
|
||||||
|
recursive-include u_utils *.html
|
||||||
|
recursive-include u_utils *.ico
|
||||||
|
recursive-include u_utils *.js
|
||||||
|
recursive-include u_utils *.json
|
||||||
|
recursive-include u_utils *.md
|
||||||
|
recursive-include u_utils *.png
|
||||||
|
recursive-include u_utils *.py
|
||||||
|
recursive-include u_utils *.svg
|
||||||
|
recursive-include u_utils *.txt
|
||||||
|
recursive-exclude u_utils *.pyc
|
7
README.md
Normal file
7
README.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
## u_utils
|
||||||
|
|
||||||
|
Utilities packages, functions and so on for prints, notifications and more
|
||||||
|
|
||||||
|
#### License
|
||||||
|
|
||||||
|
GPLv3
|
1
license.txt
Normal file
1
license.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
License: GPLv3
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# frappe -- https://github.com/frappe/frappe is installed via 'bench init'
|
19
setup.py
Normal file
19
setup.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
with open("requirements.txt") as f:
|
||||||
|
install_requires = f.read().strip().split("\n")
|
||||||
|
|
||||||
|
# get version from __version__ variable in u_utils/__init__.py
|
||||||
|
from u_utils import __version__ as version
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="u_utils",
|
||||||
|
version=version,
|
||||||
|
description="Utilities packages, functions and so on for prints, notifications and more",
|
||||||
|
author="Unitoo",
|
||||||
|
author_email="info@unitoo.it",
|
||||||
|
packages=find_packages(),
|
||||||
|
zip_safe=False,
|
||||||
|
include_package_data=True,
|
||||||
|
install_requires=install_requires
|
||||||
|
)
|
3
u_utils/__init__.py
Normal file
3
u_utils/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
__version__ = '0.0.1'
|
||||||
|
|
0
u_utils/config/__init__.py
Normal file
0
u_utils/config/__init__.py
Normal file
12
u_utils/config/desktop.py
Normal file
12
u_utils/config/desktop.py
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
from frappe import _
|
||||||
|
|
||||||
|
def get_data():
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
"module_name": "u_utils",
|
||||||
|
"color": "grey",
|
||||||
|
"icon": "octicon octicon-file-directory",
|
||||||
|
"type": "module",
|
||||||
|
"label": _("u_utils")
|
||||||
|
}
|
||||||
|
]
|
11
u_utils/config/docs.py
Normal file
11
u_utils/config/docs.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
"""
|
||||||
|
Configuration for docs
|
||||||
|
"""
|
||||||
|
|
||||||
|
# source_link = "https://github.com/[org_name]/u_utils"
|
||||||
|
# docs_base_url = "https://[org_name].github.io/u_utils"
|
||||||
|
# headline = "App that does everything"
|
||||||
|
# sub_heading = "Yes, you got that right the first time, everything"
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
context.brand_html = "u_utils"
|
188
u_utils/hooks.py
Normal file
188
u_utils/hooks.py
Normal file
|
@ -0,0 +1,188 @@
|
||||||
|
from . import __version__ as app_version
|
||||||
|
|
||||||
|
app_name = "u_utils"
|
||||||
|
app_title = "u_utils"
|
||||||
|
app_publisher = "Unitoo"
|
||||||
|
app_description = "Utilities packages, functions and so on for prints, notifications and more"
|
||||||
|
app_icon = "octicon octicon-file-directory"
|
||||||
|
app_color = "grey"
|
||||||
|
app_email = "info@unitoo.it"
|
||||||
|
app_license = "GPLv3"
|
||||||
|
|
||||||
|
# Includes in <head>
|
||||||
|
# ------------------
|
||||||
|
|
||||||
|
# include js, css files in header of desk.html
|
||||||
|
# app_include_css = "/assets/u_utils/css/u_utils.css"
|
||||||
|
# app_include_js = "/assets/u_utils/js/u_utils.js"
|
||||||
|
|
||||||
|
# include js, css files in header of web template
|
||||||
|
# web_include_css = "/assets/u_utils/css/u_utils.css"
|
||||||
|
# web_include_js = "/assets/u_utils/js/u_utils.js"
|
||||||
|
|
||||||
|
# include custom scss in every website theme (without file extension ".scss")
|
||||||
|
# website_theme_scss = "u_utils/public/scss/website"
|
||||||
|
|
||||||
|
# include js, css files in header of web form
|
||||||
|
# webform_include_js = {"doctype": "public/js/doctype.js"}
|
||||||
|
# webform_include_css = {"doctype": "public/css/doctype.css"}
|
||||||
|
|
||||||
|
# include js in page
|
||||||
|
# page_js = {"page" : "public/js/file.js"}
|
||||||
|
|
||||||
|
# include js in doctype views
|
||||||
|
# doctype_js = {"doctype" : "public/js/doctype.js"}
|
||||||
|
# doctype_list_js = {"doctype" : "public/js/doctype_list.js"}
|
||||||
|
# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
|
||||||
|
# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}
|
||||||
|
|
||||||
|
# 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 doctype
|
||||||
|
# website_generators = ["Web Page"]
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
# ------------
|
||||||
|
|
||||||
|
# before_install = "u_utils.install.before_install"
|
||||||
|
# after_install = "u_utils.install.after_install"
|
||||||
|
|
||||||
|
# Uninstallation
|
||||||
|
# ------------
|
||||||
|
|
||||||
|
# before_uninstall = "u_utils.uninstall.before_uninstall"
|
||||||
|
# after_uninstall = "u_utils.uninstall.after_uninstall"
|
||||||
|
|
||||||
|
# Desk Notifications
|
||||||
|
# ------------------
|
||||||
|
# See frappe.core.notifications.get_notification_config
|
||||||
|
|
||||||
|
# notification_config = "u_utils.notifications.get_notification_config"
|
||||||
|
|
||||||
|
# Permissions
|
||||||
|
# -----------
|
||||||
|
# Permissions evaluated in scripted ways
|
||||||
|
|
||||||
|
# permission_query_conditions = {
|
||||||
|
# "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions",
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# has_permission = {
|
||||||
|
# "Event": "frappe.desk.doctype.event.event.has_permission",
|
||||||
|
# }
|
||||||
|
|
||||||
|
# DocType Class
|
||||||
|
# ---------------
|
||||||
|
# Override standard doctype classes
|
||||||
|
|
||||||
|
# override_doctype_class = {
|
||||||
|
# "ToDo": "custom_app.overrides.CustomToDo"
|
||||||
|
# }
|
||||||
|
|
||||||
|
# Document Events
|
||||||
|
# ---------------
|
||||||
|
# Hook on document methods and events
|
||||||
|
|
||||||
|
# doc_events = {
|
||||||
|
# "*": {
|
||||||
|
# "on_update": "method",
|
||||||
|
# "on_cancel": "method",
|
||||||
|
# "on_trash": "method"
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
# Scheduled Tasks
|
||||||
|
# ---------------
|
||||||
|
|
||||||
|
# scheduler_events = {
|
||||||
|
# "all": [
|
||||||
|
# "u_utils.tasks.all"
|
||||||
|
# ],
|
||||||
|
# "daily": [
|
||||||
|
# "u_utils.tasks.daily"
|
||||||
|
# ],
|
||||||
|
# "hourly": [
|
||||||
|
# "u_utils.tasks.hourly"
|
||||||
|
# ],
|
||||||
|
# "weekly": [
|
||||||
|
# "u_utils.tasks.weekly"
|
||||||
|
# ]
|
||||||
|
# "monthly": [
|
||||||
|
# "u_utils.tasks.monthly"
|
||||||
|
# ]
|
||||||
|
# }
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
# -------
|
||||||
|
|
||||||
|
# before_tests = "u_utils.install.before_tests"
|
||||||
|
|
||||||
|
# Overriding Methods
|
||||||
|
# ------------------------------
|
||||||
|
#
|
||||||
|
# override_whitelisted_methods = {
|
||||||
|
# "frappe.desk.doctype.event.event.get_events": "u_utils.event.get_events"
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# each overriding function accepts a `data` argument;
|
||||||
|
# generated from the base implementation of the doctype dashboard,
|
||||||
|
# along with any modifications made in other Frappe apps
|
||||||
|
# override_doctype_dashboards = {
|
||||||
|
# "Task": "u_utils.task.get_dashboard_data"
|
||||||
|
# }
|
||||||
|
|
||||||
|
# exempt linked doctypes from being automatically cancelled
|
||||||
|
#
|
||||||
|
# auto_cancel_exempted_doctypes = ["Auto Repeat"]
|
||||||
|
|
||||||
|
|
||||||
|
# User Data Protection
|
||||||
|
# --------------------
|
||||||
|
|
||||||
|
user_data_fields = [
|
||||||
|
{
|
||||||
|
"doctype": "{doctype_1}",
|
||||||
|
"filter_by": "{filter_by}",
|
||||||
|
"redact_fields": ["{field_1}", "{field_2}"],
|
||||||
|
"partial": 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype": "{doctype_2}",
|
||||||
|
"filter_by": "{filter_by}",
|
||||||
|
"partial": 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype": "{doctype_3}",
|
||||||
|
"strict": False,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype": "{doctype_4}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
# Authentication and authorization
|
||||||
|
# --------------------------------
|
||||||
|
|
||||||
|
# auth_hooks = [
|
||||||
|
# "u_utils.auth.validate"
|
||||||
|
# ]
|
||||||
|
|
||||||
|
# Translation
|
||||||
|
# --------------------------------
|
||||||
|
|
||||||
|
# Make link fields search translated document names for these DocTypes
|
||||||
|
# Recommended only for DocTypes which have limited documents with untranslated names
|
||||||
|
# For example: Role, Gender, etc.
|
||||||
|
# translated_search_doctypes = []
|
1
u_utils/modules.txt
Normal file
1
u_utils/modules.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
u_utils
|
0
u_utils/patches.txt
Normal file
0
u_utils/patches.txt
Normal file
0
u_utils/templates/__init__.py
Normal file
0
u_utils/templates/__init__.py
Normal file
0
u_utils/templates/pages/__init__.py
Normal file
0
u_utils/templates/pages/__init__.py
Normal file
0
u_utils/u_utils/__init__.py
Normal file
0
u_utils/u_utils/__init__.py
Normal file
Loading…
Reference in a new issue