7 Commits
feat_11 ... fix

Author SHA1 Message Date
Derinhelm
cac9d14d52 Исправлен баг потери локализации 2021-06-08 10:29:22 +03:00
Derinhelm
57f2f72856 Merge pull request #25 from AlekseyLobanov/add_wheels_to_project
Add wheels to project
2021-06-08 09:48:20 +03:00
moscap
f8bebe8115 add some automatization and localizatipon into wheels 2021-06-08 07:55:11 +03:00
moscap
f714f5ad1d Merge branch 'master' of https://github.com/AlekseyLobanov/django-todo into add_wheels_to_project 2021-06-08 06:57:43 +03:00
moscap
437b97b005 Merge pull request #26 from AlekseyLobanov/feat_11
Добавлена локализация
2021-06-08 06:51:03 +03:00
moscap
4fdd63b234 lint improvements 2021-06-02 14:16:35 +03:00
moscap
75e1d5c13e add deployment configs and tools 2021-06-02 14:11:10 +03:00
11 changed files with 64 additions and 9 deletions

5
.gitignore vendored
View File

@@ -67,3 +67,8 @@ target/
tmp*
.env*
venv*
# Doit
*.bak
*.dat
*.dir

View File

@@ -34,12 +34,12 @@
### Frontend
Интерфейс на русском языке
```bash
python3 todo_tk.py
python3 -m frontend
```
Интерфейс на английском языке
```bash
LANG=eng python3 todo_tk.py
LANG=eng python3 -m frontend
```
### backend

19
dodo.py Normal file
View File

@@ -0,0 +1,19 @@
#!usr/bin/env python3
"""
"""
def task_mo():
"""Create bynary wheel distribution"""
return {
"actions": [
"""pybabel compile -D todo -i frontend/po/eng/LC_MESSAGES/todo.po -o frontend/po/eng/LC_MESSAGES/todo.mo"""
],
"file_dep": ["frontend/po/eng/LC_MESSAGES/todo.po"],
"targets": ["frontend/po/eng/LC_MESSAGES/todo.mo"],
}
def task_wheel():
"""Create bynary wheel distribution"""
return {"actions": ["python3 -m build -w"], "task_dep": ["mo"]}

0
frontend/__init__.py Normal file
View File

8
frontend/__main__.py Normal file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env python3
"""django-todo application launcher"""
from .todo_tk import Application
if __name__ == "__main__":
app = Application()
app.main(app.login())

View File

@@ -1,5 +1,5 @@
import random
from user import User
from .user import User
def print_lists(lists):

View File

@@ -1,8 +1,8 @@
import gettext
import os
import tkinter as tk
from user import User
import message
from .user import User
from . import message
gettext.install("todo", os.path.join(os.path.dirname(__file__), "po"))

View File

@@ -4,9 +4,9 @@ import gettext
import os
import sys
import tkinter as tk
from login import LoginFrame
from workspace import WorkSpaceFrame
from user import User
from .login import LoginFrame
from .workspace import WorkSpaceFrame
from .user import User
gettext.install("todo", os.path.join(os.path.dirname(__file__), "po"))

View File

@@ -7,7 +7,7 @@ from pathlib import Path
import json
from api import UserApi
from .api import UserApi
LIST_UPDATEBLE = ["title"]
TODO_ITEM_UPDATEBLE = ["text", "finished"]

View File

@@ -21,3 +21,15 @@ exclude = '''
| profiling
)/
'''
[build-system]
requires = [
"setuptools",
"wheel",
"requests",
"build",
"coverage",
"doit"
]
build-backend = "setuptools.build_meta"

11
setup.cfg Normal file
View File

@@ -0,0 +1,11 @@
[metadata]
name = django-todo
version = 0.0.1
[options]
packages = frontend
install_requires =
requests; python_version >= "3.6"
[options.package_data]
frontend = */*/*/todo.mo